nsw-design-system 3.9.0 → 3.9.2

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/src/main.js CHANGED
@@ -35,6 +35,7 @@ function initSite() {
35
35
  // Header Search
36
36
  const openSearchButton = document.querySelectorAll('.js-open-search')
37
37
  const closeSearchButton = document.querySelectorAll('.js-close-search')
38
+ const navigation = document.getElementById('main-nav')
38
39
  const accordions = document.querySelectorAll('.js-accordion')
39
40
  const dialogs = document.querySelectorAll('.js-dialog')
40
41
  const fileUpload = document.querySelectorAll('.js-file-upload')
@@ -54,8 +55,9 @@ function initSite() {
54
55
  new SiteSearch(element).init()
55
56
  })
56
57
 
57
- // Navigation
58
- new Navigation().init()
58
+ if (navigation) {
59
+ new Navigation(navigation).init()
60
+ }
59
61
 
60
62
  accordions.forEach((element) => {
61
63
  new Accordion(element).init()