@sentry-internal/global-search
Advanced tools
Comparing version 0.1.1 to 0.1.3
@@ -615,5 +615,21 @@ module.exports = | ||
var getChildText = function getChildText(element) { | ||
return element.children.map(function (child) { | ||
return child.type === 'tag' ? getChildText(child) : child.data.trim(); | ||
}).filter(Boolean).join(' '); | ||
return element.children.reduce(function (str, child) { | ||
var _newStr; | ||
var newStr; | ||
if (child.type === 'text') { | ||
newStr = child.data; | ||
} else if (child.type === 'tag') { | ||
newStr = getChildText(child); | ||
} | ||
newStr = (_newStr = newStr) === null || _newStr === void 0 ? void 0 : _newStr.trim(); | ||
if (newStr) { | ||
str += str ? " ".concat(newStr) : newStr; | ||
} | ||
return str; | ||
}, '').trim(); | ||
}; | ||
@@ -620,0 +636,0 @@ |
{ | ||
"name": "@sentry-internal/global-search", | ||
"description": "JavaScript library and helper utilities for searching Sentry sites via Algolia.", | ||
"version": "0.1.1", | ||
"version": "0.1.3", | ||
"author": "Sentry", | ||
@@ -6,0 +6,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
99665
1105