fix search

This commit is contained in:
Sean Yesmunt 2019-06-27 02:13:54 -04:00
parent d127725045
commit a67f387498
2 changed files with 18 additions and 14 deletions

16
dist/bundle.es.js vendored
View file

@ -3112,12 +3112,14 @@ from, isBackgroundSearch = false) => (dispatch, getState) => {
const actions = [];
data.forEach(result => {
const uri = buildURI({
claimName: result.name,
claimId: result.claimId
});
actions.push(doResolveUri(uri));
uris.push(uri);
if (result.name) {
const uri = buildURI({
claimName: result.name,
claimId: result.claimId
});
actions.push(doResolveUri(uri));
uris.push(uri);
}
});
actions.push({
@ -3128,7 +3130,7 @@ from, isBackgroundSearch = false) => (dispatch, getState) => {
}
});
dispatch(batchActions(...actions));
}).catch(() => {
}).catch(e => {
dispatch({
type: SEARCH_FAIL
});

View file

@ -117,12 +117,14 @@ export const doSearch = (
const actions = [];
data.forEach(result => {
const uri = buildURI({
claimName: result.name,
claimId: result.claimId,
});
actions.push(doResolveUri(uri));
uris.push(uri);
if (result.name) {
const uri = buildURI({
claimName: result.name,
claimId: result.claimId,
});
actions.push(doResolveUri(uri));
uris.push(uri);
}
});
actions.push({
@ -134,7 +136,7 @@ export const doSearch = (
});
dispatch(batchActions(...actions));
})
.catch(() => {
.catch(e => {
dispatch({
type: ACTIONS.SEARCH_FAIL,
});