aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/KeyValueBox.tsx
diff options
context:
space:
mode:
authorLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-12-03 01:21:46 -0800
committerLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-12-03 01:21:46 -0800
commit644c3cb25c27cf3d4b8047f9223c4797a9a29ea0 (patch)
tree2b54b631d975ff1bcf4d6cee48c981302e8756c7 /src/client/views/nodes/KeyValueBox.tsx
parentc352e3535636269243e26156c99d0438a3177c37 (diff)
parent3b045d03656383df81515485032bfda9e2b16409 (diff)
pull
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 c5ff42a1a..4ac932c24 100644
--- a/src/client/views/nodes/KeyValueBox.tsx
+++ b/src/client/views/nodes/KeyValueBox.tsx
@@ -70,7 +70,7 @@ export class KeyValueBox extends React.Component<FieldViewProps> {
public static ApplyKVPScript(doc: Doc, key: string, kvpScript: KVPScript, forceOnDelegate?: boolean): boolean {
const { script, type, onDelegate } = kvpScript;
//const target = onDelegate ? Doc.Layout(doc.layout) : Doc.GetProto(doc); // bcz: TODO need to be able to set fields on layout templates
- const target = forceOnDelegate || onDelegate ? doc : Doc.GetProto(doc);
+ const target = forceOnDelegate || onDelegate ? doc : doc.proto || doc;
let field: Field;
if (type === "computed") {
field = new ComputedField(script);