diff options
author | yipstanley <stanley_yip@brown.edu> | 2019-01-18 20:29:10 -0500 |
---|---|---|
committer | yipstanley <stanley_yip@brown.edu> | 2019-01-18 20:29:10 -0500 |
commit | 05138b7f0366e1854ebaabbea1dcc41fb7666b3d (patch) | |
tree | eb6fbdef31ee94fc6bfb8db39af50354e450ce7e /src/fields/Document.ts | |
parent | 4d2bd0796c839b25ed9b96319957d02fbe452aca (diff) | |
parent | 657b07e5a0a4d73a0b9cd9b82b69178b1658ce8b (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into move_doc_get_out_the_way
Diffstat (limited to 'src/fields/Document.ts')
-rw-r--r-- | src/fields/Document.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fields/Document.ts b/src/fields/Document.ts index c315beaef..0bba9c21e 100644 --- a/src/fields/Document.ts +++ b/src/fields/Document.ts @@ -5,7 +5,7 @@ import { ObservableMap } from "mobx"; export class Document extends Field { private fields: ObservableMap<Key, Field> = new ObservableMap(); - GetField(key: Key, ignoreProto?: boolean): Opt<Field> { + GetField(key: Key, ignoreProto: boolean = false): Opt<Field> { let field: Opt<Field>; if (ignoreProto) { if (this.fields.has(key)) { @@ -43,7 +43,7 @@ export class Document extends Field { } SetFieldValue<T extends Field>(key: Key, value: any, ctor: { new(): T }): boolean { - let field = this.GetField(key); + let field = this.GetField(key, true); if (field != null) { return field.TrySetValue(value); } else { |