aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-09-20 14:49:21 -0400
committerbobzel <zzzman@gmail.com>2024-09-20 14:49:21 -0400
commit97c150a2b53ccb27921125d55c9cbf42abf3c588 (patch)
tree16a0147600e09f12224d2cb509c1cc4ea66efe63 /src/client/documents
parent06d460562004a29060d9972857d5c76e4ee51461 (diff)
parent650ddd4c72510ed29d023d4861dedede0737d3b9 (diff)
Merge branch 'master' into eleanor-gptdraw
Diffstat (limited to 'src/client/documents')
-rw-r--r--src/client/documents/DocUtils.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/documents/DocUtils.ts b/src/client/documents/DocUtils.ts
index dcb5e1fe3..0699ea09f 100644
--- a/src/client/documents/DocUtils.ts
+++ b/src/client/documents/DocUtils.ts
@@ -243,7 +243,10 @@ export namespace DocUtils {
Object.keys(scripts).forEach(key => {
const script = scripts[key] as string;
if (ScriptCast(doc[key])?.script.originalScript !== scripts[key] && script) {
+ const additionalItems: { [key: string]: unknown } = {};
+ script.match(/_[a-zA-Z]*_/)?.forEach(match => (additionalItems[match] = 'any'));
(key.startsWith('_') ? doc : Doc.GetProto(doc))[key] = ScriptField.MakeScript(script, {
+ ...additionalItems,
this: Doc.name,
dragData: Doc.DocDragDataName,
value: 'any',