From 99cec1bd5481e62cddcc729e0e7ec283ac6166fb Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Fri, 7 Oct 2022 21:33:27 -0700 Subject: [PATCH] Fix getFontStyle error. --- .../editor/src/components/toolbar/ToolbarValueModelBuilder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/src/components/toolbar/ToolbarValueModelBuilder.ts b/packages/editor/src/components/toolbar/ToolbarValueModelBuilder.ts index 1d0a2107..6cbb1dcc 100644 --- a/packages/editor/src/components/toolbar/ToolbarValueModelBuilder.ts +++ b/packages/editor/src/components/toolbar/ToolbarValueModelBuilder.ts @@ -249,7 +249,7 @@ export class NodePropertyValueModelBuilder { getFontStyleModel(): NodePropertyValueModel { if (!this.fontStyleModel) this.fontStyleModel = { - getValue: () => this.selectedTopic().getFontStyle(), + getValue: () => this.selectedTopic()?.getFontStyle(), switchValue: () => designer.changeFontStyle(), }; return this.fontStyleModel;