diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2019-07-02 15:17:59 -0400 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-07-02 15:17:59 -0400 |
| commit | 361c2101f7e3ce08f6ca45ad34256e11fe608700 (patch) | |
| tree | 7f2798ad7d4db608a25a8fac2a8365e333f7cc32 /src/client/views/search/SearchItem.tsx | |
| parent | 9b6a8b6685e1bb98960f650997663e5bb8501c4a (diff) | |
| parent | e68a306f8b75d84b589fff19ed8a141fe2162355 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/search/SearchItem.tsx')
| -rw-r--r-- | src/client/views/search/SearchItem.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/search/SearchItem.tsx b/src/client/views/search/SearchItem.tsx index f8a0c7b16..5a7bdd24d 100644 --- a/src/client/views/search/SearchItem.tsx +++ b/src/client/views/search/SearchItem.tsx @@ -48,9 +48,9 @@ export class SelectorContextMenu extends React.Component<SearchItemProps> { async fetchDocuments() { let aliases = (await SearchUtil.GetViewsOfDocument(this.props.doc)).filter(doc => doc !== this.props.doc); - const docs = await SearchUtil.Search(`data_l:"${this.props.doc[Id]}"`, true); + const { docs } = await SearchUtil.Search(`data_l:"${this.props.doc[Id]}"`, true); const map: Map<Doc, Doc> = new Map; - const allDocs = await Promise.all(aliases.map(doc => SearchUtil.Search(`data_l:"${doc[Id]}"`, true))); + const allDocs = await Promise.all(aliases.map(doc => SearchUtil.Search(`data_l:"${doc[Id]}"`, true).then(result => result.docs))); allDocs.forEach((docs, index) => docs.forEach(doc => map.set(doc, aliases[index]))); docs.forEach(doc => map.delete(doc)); runInAction(() => { |
