Add condition to check if there is no desc

This commit is contained in:
alistair3149 2019-12-12 00:35:37 -05:00
parent ef5954b71f
commit 61df983d18

View file

@ -308,7 +308,7 @@ window.WMTypeAhead = function(appendTo, searchInput) { // eslint-disable-line no
descriptionText = ''; descriptionText = '';
// Check if description exists // Check if description exists
if (pageDescription) { if (pageDescription || pageDescription != '...') {
// If the description is an array, use the first item // If the description is an array, use the first item
if (typeof pageDescription === 'object' && pageDescription[0]) { if (typeof pageDescription === 'object' && pageDescription[0]) {
descriptionText = pageDescription[0].toString(); descriptionText = pageDescription[0].toString();