diff --git a/src/components/ArticleV2/ArticleToCSteps.js b/src/components/ArticleV2/ArticleToCSteps.js index 93e5aeb9..1d3bd5d7 100644 --- a/src/components/ArticleV2/ArticleToCSteps.js +++ b/src/components/ArticleV2/ArticleToCSteps.js @@ -79,7 +79,9 @@ const ArticleToCSteps = ({ const expandSteps = (stepIdxs) => { expandedStepsRef.current = stepIdxs console.debug('[ArticleToCSteps] expandSteps', stepIdxs, expandedStepsRef.current) - + if (!steps.length) { + return + } api.start((i) => { // check if the step (section) is in the list of steps to expand (or to become visible) const isVisible = stepIdxs.includes(i) diff --git a/src/components/GuidelinesNotebookViewer.js b/src/components/GuidelinesNotebookViewer.js index f5b09a20..95e0e655 100644 --- a/src/components/GuidelinesNotebookViewer.js +++ b/src/components/GuidelinesNotebookViewer.js @@ -91,6 +91,7 @@ const GuidelinesNotebookViewer = ({ articleTree={tree} ignoreBinder={true} plainTitle={plainTitle} + onDataHrefClick={() => {}} > {children} diff --git a/src/pages/Guidelines.v2.js b/src/pages/Guidelines.v2.js index 545c5e85..9c1b109b 100644 --- a/src/pages/Guidelines.v2.js +++ b/src/pages/Guidelines.v2.js @@ -52,7 +52,7 @@ const GuidelinesShuffler = ({ data = '', isFake }) => { return { key, label, url: link.match(/\(([^)]+)\)/).pop() } }) const availableNotebookIds = availableNotebooks.map((n) => n.key) - const notebook = availableNotebooks.find((n) => n.key === safeNotebookId) + const notebook = availableNotebooks.find((n) => n.key === safeNotebookId) || availableNotebooks[0] const notebookUrl = notebook?.url const memoid = [