aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Doc.ts
diff options
context:
space:
mode:
authorfawn <fangrui_tong@brown.edu>2019-07-30 16:52:12 -0400
committerfawn <fangrui_tong@brown.edu>2019-07-30 16:52:12 -0400
commitf7c0948910182f5f6cb2c10c216994e2bc7b91b0 (patch)
tree6d443543c7475f4104bf7b8a3be788bb3ce2a3ec /src/new_fields/Doc.ts
parent78999b8b35267db9236bbb69e7e90e8691c59ba9 (diff)
parent8ca17d379ce7d3cc751408553b6819223d31a3e0 (diff)
merged
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r--src/new_fields/Doc.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index da4f459e2..59314783b 100644
--- a/src/new_fields/Doc.ts
+++ b/src/new_fields/Doc.ts
@@ -12,6 +12,7 @@ import { scriptingGlobal } from "../client/util/Scripting";
import { List } from "./List";
import { DocumentType } from "../client/documents/Documents";
import { ComputedField } from "./ScriptField";
+import { PrefetchProxy } from "./Proxy";
export namespace Field {
export function toKeyValueString(doc: Doc, key: string): string {
@@ -348,7 +349,7 @@ export namespace Doc {
while (proto && !Doc.IsPrototype(proto)) {
proto = proto.proto;
}
- (proto ? proto : doc)[fieldKey + "_ext"] = docExtensionForField;
+ (proto ? proto : doc)[fieldKey + "_ext"] = new PrefetchProxy(docExtensionForField);
}, 0);
} else if (doc instanceof Doc) { // backward compatibility -- add fields for docs that don't have them already
docExtensionForField.extendsDoc === undefined && setTimeout(() => docExtensionForField.extendsDoc = doc, 0);