diff --git a/src/js/50-cheat-sheet-toggle.js b/src/js/50-cheat-sheet-toggle.js index ff0af990..eb72a47c 100644 --- a/src/js/50-cheat-sheet-toggle.js +++ b/src/js/50-cheat-sheet-toggle.js @@ -26,8 +26,14 @@ const prodMatrix = { // get the default product from optionMap const defaultProdArray = optionMap.find((prod) => prod.default === 'true') -const defaultProd = defaultProdArray ? defaultProdArray.value : optionMap[0].value +// display for 'all' products unless a differnt value is specified via attributes in source +let defaultProd +if (defaultProdArray && optionMap) { + defaultProd = defaultProdArray ? defaultProdArray.value : optionMap[0].value +} else { + defaultProd = 'all' +} const defaultClasses = ['exampleblock', 'sect2', 'sect1'] document.addEventListener('DOMContentLoaded', function () { diff --git a/src/partials/nav-selectors.hbs b/src/partials/nav-selectors.hbs index 65c9e705..a63a6301 100644 --- a/src/partials/nav-selectors.hbs +++ b/src/partials/nav-selectors.hbs @@ -17,7 +17,7 @@