check for null and undefined
This commit is contained in:
parent
4056fb86cf
commit
3a061df1a4
1 changed files with 3 additions and 1 deletions
|
@ -477,7 +477,9 @@ class LighthouseControllers {
|
|||
if (name.indexOf(ctx.query.s.trim()) > -1 && name.indexOf('http') === -1) {
|
||||
cResults.push(name);
|
||||
}
|
||||
if (pResult._source.value && pResult._source.value.stream !== undefined) {
|
||||
if (pResult._source.value &&
|
||||
pResult._source.value.stream &&
|
||||
pResult._source.value.stream !== undefined){
|
||||
var title = pResult._source.value.stream.metadata.title;
|
||||
var author = pResult._source.value.stream.metadata.author;
|
||||
if (title.indexOf(ctx.query.s.trim()) > -1 && title.indexOf('http') === -1) {
|
||||
|
|
Loading…
Reference in a new issue