Authored by ccbikai(👎🏻🍜)

Merge branch 'release/5.1' into grey

@@ -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 }