aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/KeyValuePair.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-05-08 00:45:14 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-05-08 00:45:14 -0400
commitd588a4543f1ccc06d1e45fe748007b730c18c042 (patch)
tree94991fa0166242205bcfe0cb3d251634a348352f /src/client/views/nodes/KeyValuePair.tsx
parent26141a697ae52a7edf3cc6845ce2153111f8860e (diff)
small fixes to titles, templates, minimizing, and keyvalue deletion
Diffstat (limited to 'src/client/views/nodes/KeyValuePair.tsx')
-rw-r--r--src/client/views/nodes/KeyValuePair.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/nodes/KeyValuePair.tsx b/src/client/views/nodes/KeyValuePair.tsx
index 203fb5625..5de660d57 100644
--- a/src/client/views/nodes/KeyValuePair.tsx
+++ b/src/client/views/nodes/KeyValuePair.tsx
@@ -46,8 +46,9 @@ export class KeyValuePair extends React.Component<KeyValuePairProps> {
<td className="keyValuePair-td-key" style={{ width: `${this.props.keyWidth}%` }}>
<div className="keyValuePair-td-key-container">
<button className="keyValuePair-td-key-delete" onClick={() => {
- let field = FieldValue(props.Document[props.fieldKey]);
- field && (props.Document[props.fieldKey] = undefined);
+ if (Object.keys(props.Document).indexOf(props.fieldKey) !== -1)
+ props.Document[props.fieldKey] = undefined;
+ else props.Document.proto![props.fieldKey] = undefined;
}}>
X
</button>