Skip to content

Commit 096a012

Browse files
authored
Guard against undefined author
1 parent 3b98b00 commit 096a012

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ function refreshLibrary(options) {
680680
Utils.searchRelevance(app.name, searchValue)*(app.shortName?1:2) +
681681
(app.shortName?Utils.searchRelevance(app.shortName, searchValue):0) + // if we have shortname, match on that as well
682682
Utils.searchRelevance(app.description, searchValue)/5 + // match on description, but pay less attention
683-
Utils.searchRelevance(app.author, searchValue)/3+ //match by author, but less attention as well
683+
(app.author?Utils.searchRelevance(app.author, searchValue)/3:0)+ //match by author, but less attention as well
684684
((app.tags && app.tags.includes(searchValue))?10:0)
685685
}));
686686
} else {

0 commit comments

Comments
 (0)