diff options
author | geireann <geireann.lindfield@gmail.com> | 2021-09-12 10:03:00 -0400 |
---|---|---|
committer | geireann <geireann.lindfield@gmail.com> | 2021-09-12 10:03:00 -0400 |
commit | 939c7d092635e47e081aa8f047b73af36058f3b7 (patch) | |
tree | 7b5d4a9dce0c66ce3e2bd62755f536d41db48181 /src/client/views/DocComponent.tsx | |
parent | f20dfa857e1651ced1eb2303ea8a8462483fbc4c (diff) | |
parent | d9419c89ccdac7435c87b27a55486b7a5980ae29 (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.tsx | 2 |
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]; |