aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/DocUtils.ts
diff options
context:
space:
mode:
authoralyssaf16 <alyssa_feinberg@brown.edu>2024-09-29 15:56:04 -0400
committeralyssaf16 <alyssa_feinberg@brown.edu>2024-09-29 15:56:04 -0400
commitd9389cf288829bc8dd8c26a91693b1cfc4edacfb (patch)
tree6c4e0e353bd2bbfe14ee7fb382ea9e29a5fcaafa /src/client/documents/DocUtils.ts
parentef2a1037a418ad9fa35d6c60feba914d828d5b84 (diff)
parente9c9476ad3958b89843057dc4287ced180ee04c4 (diff)
Merge branch 'alyssa-starter' of https://github.com/brown-dash/Dash-Web into alyssa-starter
Diffstat (limited to 'src/client/documents/DocUtils.ts')
-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 74a0f5220..1696de7ad 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',