Skip to content

Commit

Permalink
Update search.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryoichi Ando committed Jul 28, 2021
1 parent eaf3bbf commit dd2bb44
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions resources/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,14 @@ function search ( keywords, add_year, add_paper, add_snippet, param=null, import
}
//
if( keywords_dict['journal'].length ) {
let flag = true;
let journal = papers[dir]['journal'].toLowerCase();
for (const word of keywords_dict['journal'] ) {
if( journal.indexOf(word) < 0 ) {
flag = false;
break;
if( 'journal' in papers[dir] ) {
let flag = true;
let journal = papers[dir]['journal'].toLowerCase();
for (const word of keywords_dict['journal'] ) {
if( journal.indexOf(word) < 0 ) {
flag = false;
break;
}
}
}
paper_pass.push(flag);
Expand Down

0 comments on commit dd2bb44

Please sign in to comment.