From 4b3117855695d2d7dad36c5de4d4b7ea67dfba96 Mon Sep 17 00:00:00 2001 From: "harper.gqc" Date: Thu, 9 Nov 2023 17:35:13 +0800 Subject: [PATCH] fix: canvas text empty shapes --- player/js/elements/canvasElements/CVTextElement.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/player/js/elements/canvasElements/CVTextElement.js b/player/js/elements/canvasElements/CVTextElement.js index 52ef05e37..dade60b48 100644 --- a/player/js/elements/canvasElements/CVTextElement.js +++ b/player/js/elements/canvasElements/CVTextElement.js @@ -89,7 +89,7 @@ CVTextElement.prototype.buildNewText = function () { yPos += firstLine ? 1 : 0; firstLine = false; } - shapes = shapeData.shapes ? shapeData.shapes[0].it : []; + shapes = shapeData.shapes && shapeData.shapes[0] ? shapeData.shapes[0].it : []; jLen = shapes.length; matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100); if (singleShape) {