fix: crash on blank title

This commit is contained in:
Thomas Zarebczan 2019-06-06 12:02:43 -04:00
parent 1b98a13082
commit 5c8d3b4143
2 changed files with 12 additions and 8 deletions

10
dist/bundle.es.js vendored
View file

@ -2270,10 +2270,12 @@ const selectSearchDownloadUris = query => reselect.createSelector(selectFileInfo
return; return;
} }
const titleParts = title.toLowerCase().split(' '); if (title) {
if (arrayContainsQueryPart(titleParts)) { const titleParts = title.toLowerCase().split(' ');
downloadResultsFromQuery.push(fileInfo); if (arrayContainsQueryPart(titleParts)) {
return; downloadResultsFromQuery.push(fileInfo);
return;
}
} }
if (author) { if (author) {

View file

@ -164,10 +164,12 @@ export const selectSearchDownloadUris = query =>
return; return;
} }
const titleParts = title.toLowerCase().split(' '); if (title) {
if (arrayContainsQueryPart(titleParts)) { const titleParts = title.toLowerCase().split(' ');
downloadResultsFromQuery.push(fileInfo); if (arrayContainsQueryPart(titleParts)) {
return; downloadResultsFromQuery.push(fileInfo);
return;
}
} }
if (author) { if (author) {