diff options
Diffstat (limited to 'src/client/views/nodes/KeyValueBox.tsx')
-rw-r--r-- | src/client/views/nodes/KeyValueBox.tsx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/client/views/nodes/KeyValueBox.tsx b/src/client/views/nodes/KeyValueBox.tsx index 8acf4081c..383650e89 100644 --- a/src/client/views/nodes/KeyValueBox.tsx +++ b/src/client/views/nodes/KeyValueBox.tsx @@ -61,10 +61,7 @@ export class KeyValueBox extends React.Component<FieldViewProps> { const options: ScriptOptions = { addReturn: true, params: { this: "Doc", _last_: "any" }, editable: false }; if (dubEq) options.typecheck = false; const script = CompileScript(value, options); - if (!script.compiled) { - return undefined; - } - return { script, type: dubEq, onDelegate: eq }; + return !script.compiled ? undefined : { script, type: dubEq, onDelegate: eq }; } public static ApplyKVPScript(doc: Doc, key: string, kvpScript: KVPScript, forceOnDelegate?: boolean): boolean { @@ -100,9 +97,7 @@ export class KeyValueBox extends React.Component<FieldViewProps> { e.stopPropagation(); } } - onPointerWheel = (e: React.WheelEvent): void => { - e.stopPropagation(); - } + onPointerWheel = (e: React.WheelEvent): void => e.stopPropagation(); rowHeight = () => 30; |