Merge branch 'release/5.1' into grey
Showing
1 changed file
with
1 additions
and
1 deletions
@@ -142,7 +142,7 @@ const index = (req, res, next) => { | @@ -142,7 +142,7 @@ const index = (req, res, next) => { | ||
142 | }), | 142 | }), |
143 | pageFooter: true, | 143 | pageFooter: true, |
144 | search: { | 144 | search: { |
145 | - defaultTerms: (result.defaultTerms.length !== 0) ? result.defaultTerms[0].content : '', | 145 | + defaultTerms: (result.length && result.defaultTerms && result.defaultTerms.length !== 0) ? result.defaultTerms[0].content : '', |
146 | url: helpers.urlFormat('', null, 'search'), | 146 | url: helpers.urlFormat('', null, 'search'), |
147 | hotTerms: result.hotTerms | 147 | hotTerms: result.hotTerms |
148 | } | 148 | } |
-
Please register or login to post a comment