This is an automated email from the ASF dual-hosted git repository. zregvart pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-website.git
commit b13eb7c00058ef5edf30fb2a78a340714b68f7f1 Author: Nayananga Muhandiram <[email protected]> AuthorDate: Sun Mar 1 11:47:02 2020 +0530 fix: fixed console error when searching --- antora-ui-camel/src/js/06-search.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/antora-ui-camel/src/js/06-search.js b/antora-ui-camel/src/js/06-search.js index c582ea5..4560845 100644 --- a/antora-ui-camel/src/js/06-search.js +++ b/antora-ui-camel/src/js/06-search.js @@ -33,7 +33,11 @@ window.addEventListener('load', () => { const d = {} d.url = hit.url d.breadcrumbs = Object.values(hit.hierarchy).slice(1).filter((lvl) => lvl !== null).join(' » ') - d.snippet = hit._snippetResult.content.value + if (hit._snippetResult !== undefined) { + d.snippet = hit._snippetResult.content.value + } else { + d.snippet = '' + } const section = hit.hierarchy.lvl0 data[section] = data[section] || []
