aboutsummaryrefslogtreecommitdiff
path: root/src/fields/Document.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/fields/Document.ts')
-rw-r--r--src/fields/Document.ts4
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 {