diff options
author | Fawn <fangrui_tong@brown.edu> | 2019-07-29 11:27:58 -0400 |
---|---|---|
committer | Fawn <fangrui_tong@brown.edu> | 2019-07-29 11:27:58 -0400 |
commit | 7ea25f83dfcb3fb31bf6fce1f4112c8bded294e2 (patch) | |
tree | 1d3cfa0d5f8e3424423c1ed5fdfc06c027c2df48 /src/new_fields/Proxy.ts | |
parent | 7098f381f3f93e77880f3589427c81e61a5ee25a (diff) | |
parent | e7ea2028f54787d6c92fb22b789f17b7268d3793 (diff) |
fixed sub collections having wrong children
Diffstat (limited to 'src/new_fields/Proxy.ts')
-rw-r--r-- | src/new_fields/Proxy.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/new_fields/Proxy.ts b/src/new_fields/Proxy.ts index 14f08814e..b3e8d6467 100644 --- a/src/new_fields/Proxy.ts +++ b/src/new_fields/Proxy.ts @@ -6,6 +6,7 @@ import { DocServer } from "../client/DocServer"; import { RefField } from "./RefField"; import { ObjectField } from "./ObjectField"; import { Id, Copy, ToScriptString } from "./FieldSymbols"; +import { scriptingGlobal } from "../client/util/Scripting"; @Deserializable("proxy") export class ProxyField<T extends RefField> extends ObjectField { @@ -66,3 +67,12 @@ export class ProxyField<T extends RefField> extends ObjectField { return this.promise as any; } } + +function prefetchValue(proxy: PrefetchProxy<RefField>) { + return proxy.value() as any; +} + +@scriptingGlobal +@Deserializable("prefetch_proxy", prefetchValue) +export class PrefetchProxy<T extends RefField> extends ProxyField<T> { +} |