aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/KeyValueBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-02-10 17:12:19 -0500
committerbobzel <zzzman@gmail.com>2022-02-10 17:12:19 -0500
commit956628a22c2d8ae21eb76c70f8f0a5a4edc9ae75 (patch)
tree535fd5b10420d579d5334d22c2e6374b12feecf2 /src/client/views/nodes/KeyValueBox.tsx
parenta6d904bcd18a2c9962abfd9b5b325340f6b18b0d (diff)
switched scripts to use a cache to avoid recompiling. simplified some things with documentView and zooming to avoid invalidations.
Diffstat (limited to 'src/client/views/nodes/KeyValueBox.tsx')
-rw-r--r--src/client/views/nodes/KeyValueBox.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/KeyValueBox.tsx b/src/client/views/nodes/KeyValueBox.tsx
index 111509fdb..c44c8c828 100644
--- a/src/client/views/nodes/KeyValueBox.tsx
+++ b/src/client/views/nodes/KeyValueBox.tsx
@@ -58,7 +58,7 @@ export class KeyValueBox extends React.Component<FieldViewProps> {
value = eq ? value.substr(1) : value;
const dubEq = value.startsWith(":=") ? "computed" : value.startsWith(";=") ? "script" : false;
value = dubEq ? value.substr(2) : value;
- const options: ScriptOptions = { addReturn: true, params: { this: "Doc", _last_: "any" }, editable: false };
+ const options: ScriptOptions = { addReturn: true, params: { this: Doc.name, self: Doc.name, _last_: "any", _readOnly_: "boolean" }, editable: false };
if (dubEq) options.typecheck = false;
const script = CompileScript(value, options);
return !script.compiled ? undefined : { script, type: dubEq, onDelegate: eq };