hdoc-tools 0.9.23 → 0.9.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/hdoc-module.js CHANGED
@@ -328,7 +328,7 @@
328
328
  } else {
329
329
  bc[nav_b.link] = [{
330
330
  text: parent_a,
331
- link: nav_a.items[0].link
331
+ link: nav_a.items[0].link !== undefined ? nav_a.items[0].link : ''
332
332
  }];
333
333
  }
334
334
  bc[nav_b.link].push({
@@ -347,7 +347,7 @@
347
347
  } else {
348
348
  bc[nav_c.link] = [{
349
349
  text: parent_a,
350
- link: nav_a.items[0].link
350
+ link: nav_a.items[0].link !== undefined ? nav_a.items[0].link : ''
351
351
  }];
352
352
  bc[nav_c.link].push({
353
353
  text: parent_b,
@@ -369,7 +369,7 @@
369
369
  } else {
370
370
  bc[nav_d.link] = [{
371
371
  text: parent_a,
372
- link: nav_a.items[0].link
372
+ link: nav_a.items[0].link !== undefined ? nav_a.items[0].link : ''
373
373
  }];
374
374
  bc[nav_d.link].push({
375
375
  text: parent_b,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hdoc-tools",
3
- "version": "0.9.23",
3
+ "version": "0.9.25",
4
4
  "description": "Hornbill HDocBook Development Support Tool",
5
5
  "main": "hdoc.js",
6
6
  "bin": {
@@ -112,7 +112,9 @@ function listenForHrefClicks()
112
112
  //-- do we need to scroll into view element on this page
113
113
  if(checkUrl.hash && getAnchorFromHash(checkUrl.hash,"faq-toc-item"))
114
114
  {
115
- getAnchorFromHash(checkUrl.hash,"faq-toc-item").scrollIntoView();
115
+ let eleAnc = getAnchorFromHash(checkUrl.hash,"faq-toc-item");
116
+ if(eleAnc[0] && eleAnc[0].scrollIntoView)scrollIntoView[0].scrollIntoView();
117
+
116
118
  if(ele.href!==document.location.href) window.history.pushState(null, null, ele.href); //-- user has clicked a link so we want to add state to history so we can click back
117
119
  }
118
120
  else