You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2020/03/04 13:01:53 UTC
[camel-website] 04/13: fix: fixed console error when searching
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 <na...@wso2.com>
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] || []