From 6f9c3fcbf9f9fb84a8fd5e9665e9063d2ff81ae5 Mon Sep 17 00:00:00 2001 From: Nguyen Huu Kim Date: Tue, 9 Aug 2022 09:56:00 +0700 Subject: [PATCH] fix(TextPath): comparison is always false `pathCmd === {}` --- src/shapes/TextPath.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shapes/TextPath.ts b/src/shapes/TextPath.ts index ae2eaf60..cfd645a1 100644 --- a/src/shapes/TextPath.ts +++ b/src/shapes/TextPath.ts @@ -306,7 +306,7 @@ export class TextPath extends Shape { } } - if (pathCmd === {} || p0 === undefined) { + if (Object.keys(pathCmd).length === 0 || p0 === undefined) { return undefined; }