aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocComponent.tsx
diff options
context:
space:
mode:
authorgeireann <geireann.lindfield@gmail.com>2021-09-12 10:03:00 -0400
committergeireann <geireann.lindfield@gmail.com>2021-09-12 10:03:00 -0400
commit939c7d092635e47e081aa8f047b73af36058f3b7 (patch)
tree7b5d4a9dce0c66ce3e2bd62755f536d41db48181 /src/client/views/DocComponent.tsx
parentf20dfa857e1651ced1eb2303ea8a8462483fbc4c (diff)
parentd9419c89ccdac7435c87b27a55486b7a5980ae29 (diff)
Merge branch 'menu_updates_geireann' of https://github.com/brown-dash/Dash-Web into menu_updates_geireann
Diffstat (limited to 'src/client/views/DocComponent.tsx')
-rw-r--r--src/client/views/DocComponent.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/DocComponent.tsx b/src/client/views/DocComponent.tsx
index 33dff9da5..cb36f4270 100644
--- a/src/client/views/DocComponent.tsx
+++ b/src/client/views/DocComponent.tsx
@@ -115,7 +115,7 @@ export function ViewBoxAnnotatableComponent<P extends ViewBoxAnnotatableProps, T
const style: { [key: string]: any } = {};
const divKeys = ["width", "height", "fontSize", "transform", "left", "background", "left", "right", "top", "bottom", "pointerEvents", "position"];
const replacer = (match: any, expr: string, offset: any, string: any) => { // bcz: this executes a script to convert a property expression string: { script } into a value
- return ScriptField.MakeFunction(expr, { self: Doc.name, this: Doc.name, scale: "number" })?.script.run({ self: this.rootDoc, this: this.layoutDoc, scale }).result as string || "";
+ return ScriptField.MakeFunction(expr, { self: Doc.name, this: Doc.name, scale: "number" })?.script.run({ self: this.rootDoc, this: this.layoutDoc, scale }).result?.toString() ?? "";
};
divKeys.map((prop: string) => {
const p = (this.props as any)[prop];