aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ScriptingBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-11-10 20:50:09 -0500
committerbobzel <zzzman@gmail.com>2022-11-10 20:50:09 -0500
commitfd19fa3539f9ecca4f2eed7f1fe1c12331902969 (patch)
tree406797fac3f455d8a2cf025432c0d888f751593c /src/client/views/nodes/ScriptingBox.tsx
parent90bf9ea9e32ed695a36d0334e99fd859bbe51c15 (diff)
fixed scriptingBox to always have this and self bound properly. fixed presElement to allow group with up
Diffstat (limited to 'src/client/views/nodes/ScriptingBox.tsx')
-rw-r--r--src/client/views/nodes/ScriptingBox.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/ScriptingBox.tsx b/src/client/views/nodes/ScriptingBox.tsx
index 4c8a836f1..281967a21 100644
--- a/src/client/views/nodes/ScriptingBox.tsx
+++ b/src/client/views/nodes/ScriptingBox.tsx
@@ -197,7 +197,7 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatable
const bindings: { [name: string]: any } = {};
this.paramsNames.forEach(key => (bindings[key] = this.rootDoc[key]));
// binds vars so user doesnt have to refer to everything as self.<var>
- ScriptCast(this.rootDoc[this.fieldKey], null)?.script.run({ self: this.rootDoc, this: this.layoutDoc, ...bindings }, this.onError);
+ ScriptCast(this.rootDoc[this.fieldKey], null)?.script.run({ ...bindings, self: this.rootDoc, this: this.layoutDoc }, this.onError);
}
};