aboutsummaryrefslogtreecommitdiff
path: root/src/fields/Document.ts
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-02-22 03:01:30 -0500
committerTyler Schicke <tyler_schicke@brown.edu>2019-02-22 03:01:30 -0500
commitfed460a9dffd85b32e30aeb112f2c7c47371bce6 (patch)
tree16f8c1d9b4a5e3e4e1b22e6b6520b793801c8b28 /src/fields/Document.ts
parent3f9e4363e6601eac175ff71192d414fd6051d921 (diff)
Added CollectionView
Switched sub-collections to not inherit from CollectionViewBase
Diffstat (limited to 'src/fields/Document.ts')
-rw-r--r--src/fields/Document.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fields/Document.ts b/src/fields/Document.ts
index 6667485b6..ff13732b3 100644
--- a/src/fields/Document.ts
+++ b/src/fields/Document.ts
@@ -90,6 +90,15 @@ export class Document extends Field {
return field;
}
+ GetAsync(key: Key, callback: (field: Field) => void): boolean {
+ //This currently doesn't deal with prototypes
+ if (this._proxies.has(key.Id)) {
+ Server.GetDocumentField(this, key, callback);
+ return true;
+ }
+ return false;
+ }
+
GetT<T extends Field = Field>(key: Key, ctor: { new(...args: any[]): T }, ignoreProto: boolean = false): FieldValue<T> {
var getfield = this.Get(key, ignoreProto);
if (getfield != FieldWaiting) {