소스 검색

Fix pasting styles on text elements (#833)

Faustino Kialungila 5 년 전
부모
커밋
2131befd7a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/actions/actionStyles.ts

+ 1 - 1
src/actions/actionStyles.ts

@@ -43,7 +43,7 @@ export const actionPasteStyles: Action = {
             roughness: pastedElement?.roughness,
           };
           if (isTextElement(newElement)) {
-            newElement.font = pastedElement?.font;
+            newElement.font = pastedElement?.font || "20px Virgil";
             redrawTextBoundingBox(newElement);
           }
           return newElement;