diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2019-07-09 14:47:30 -0400 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-07-09 14:47:30 -0400 |
commit | 146521beef8ef2ca836a0b4a63a66bdf48485098 (patch) | |
tree | b2a92990ed91fa6487493a4167b65b36d697a752 /src | |
parent | 7a33f0b56f1182c19cc7ea1b276da3a674438957 (diff) |
preparing for merging into master
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/CollectionSubView.tsx | 7 | ||||
-rw-r--r-- | src/new_fields/Doc.ts | 1 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx index a8810f336..873fb518c 100644 --- a/src/client/views/collections/CollectionSubView.tsx +++ b/src/client/views/collections/CollectionSubView.tsx @@ -72,6 +72,7 @@ export function CollectionSubView<T>(schemaCtor: (doc: Doc) => T) { if (!proto) { return; } + // The following conditional detects a recurring bug we've seen on the server if (proto[Id] === "collectionProto") { alert("COLLECTION PROTO CURSOR ISSUE DETECTED! Check console for more info..."); console.log(doc); @@ -216,9 +217,9 @@ export function CollectionSubView<T>(schemaCtor: (doc: Doc) => T) { body: formData }).then(async (res: Response) => { (await res.json()).map(action((file: any) => { - let path = window.location.origin + file; - let docPromise = Docs.getDocumentFromType(type, path, { ...options, nativeWidth: 300, width: 300, title: dropFileName }); - docPromise.then(doc => doc && this.props.addDocument(doc)); + let full = { ...options, nativeWidth: 300, width: 300, title: dropFileName }; + let path = DocServer.prepend(file); + Docs.getDocumentFromType(type, path, full).then(doc => doc && this.props.addDocument(doc)); })); }); promises.push(prom); diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts index d180f8b01..a07f56ca4 100644 --- a/src/new_fields/Doc.ts +++ b/src/new_fields/Doc.ts @@ -251,7 +251,6 @@ export namespace Doc { if (allowDuplicates !== true) { let pind = list.reduce((l, d, i) => d instanceof Doc && Doc.AreProtosEqual(d, doc) ? i : l, -1); if (pind !== -1) { - console.log("SPLICING DUPLICATE"); list.splice(pind, 1); } } |