[Library|Trunk]

SEO - robots filter: check for empty values



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60842 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2021-04-12 15:38:21 +00:00
parent 17d38d59a6
commit ba496417ce
1 changed files with 2 additions and 2 deletions

View File

@ -673,9 +673,9 @@ export class ResultLandingComponent {
} }
} }
private hasKeyword(value:string, words:string[]){ private hasKeyword(value:string, words:string[]){
return words.filter( word => { return value.toLowerCase().indexOf(word)!=-1}).length > 0; return value?words.filter( word => { return value.toLowerCase().indexOf(word)!=-1}).length > 0:0;
} }
private isKeyword(value:string, words:string[]){ private isKeyword(value:string, words:string[]){
return words.filter( word => { return value.toLowerCase() == word}).length > 0; return value?words.filter( word => { return value.toLowerCase() == word}).length > 0:0;
} }
} }