diff options
Diffstat (limited to 'src/fields')
| -rw-r--r-- | src/fields/Doc.ts | 1 | ||||
| -rw-r--r-- | src/fields/Schema.ts | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index da95c3605..5e9ab4baa 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -1063,6 +1063,7 @@ export namespace Doc { // all documents with the specified value for the specified key are included/excluded // based on the modifiers :"check", "x", undefined export function setDocFilter(target: Opt<Doc>, key: string, value: any, modifiers?: "remove" | "match" | "check" | "x" | undefined) { + // console.log(key, value, modifiers); const container = target ?? CollectionDockingView.Instance.props.Document; const docFilters = Cast(container._docFilters, listSpec("string"), []); runInAction(() => { diff --git a/src/fields/Schema.ts b/src/fields/Schema.ts index 4607e0fd5..e0fc5902b 100644 --- a/src/fields/Schema.ts +++ b/src/fields/Schema.ts @@ -68,7 +68,7 @@ export function makeInterface<T extends Interface[]>(...schemas: T): InterfaceFu if (doc instanceof Doc || doc === undefined) { return fn(doc || new Doc); } else { - return doc.map(fn); + if (!doc instanceof Promise) return doc.map(fn); } }; } |
