diff options
author | bobzel <zzzman@gmail.com> | 2024-09-30 11:22:45 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-09-30 11:22:45 -0400 |
commit | 04f1047d81bba00f9258543a8171683bce5272bb (patch) | |
tree | 2e09704251382f554b0ea7e7c92e1e3a92b1b838 /src/client/documents/DocUtils.ts | |
parent | b08befda6d7ec07a0e6653ccf5040474886dcd44 (diff) | |
parent | 22c1885a7469a6d5e94fff279225665a1ef1448b (diff) |
merged with master
Diffstat (limited to 'src/client/documents/DocUtils.ts')
-rw-r--r-- | src/client/documents/DocUtils.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/documents/DocUtils.ts b/src/client/documents/DocUtils.ts index 30b71a09b..4d105e372 100644 --- a/src/client/documents/DocUtils.ts +++ b/src/client/documents/DocUtils.ts @@ -241,7 +241,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', |