Skip to content

Commit

Permalink
hotfix: guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleguido committed Jun 3, 2024
1 parent 21b3f40 commit 7c9104b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/ArticleV2/ArticleToCSteps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/components/GuidelinesNotebookViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ const GuidelinesNotebookViewer = ({
articleTree={tree}
ignoreBinder={true}
plainTitle={plainTitle}
onDataHrefClick={() => {}}
>
{children}
</ArticleFlow>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Guidelines.v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit 7c9104b

Please sign in to comment.