From 4159fbe11cff7b793976348a656a5e4ea4d8818e Mon Sep 17 00:00:00 2001 From: Howard Gil Date: Wed, 21 Aug 2024 14:31:40 -0700 Subject: [PATCH] WIP --- docs/v1/examples/multi_session.mdx | 2 +- docs/v1/scripts/use_notebook.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/v1/examples/multi_session.mdx b/docs/v1/examples/multi_session.mdx index a50a382a3..976727eb2 100644 --- a/docs/v1/examples/multi_session.mdx +++ b/docs/v1/examples/multi_session.mdx @@ -3,7 +3,7 @@ title: 'Multi-Session Example' description: 'Handling multiple sessions at the same time' mode: "wide" --- -_View Notebook on Github_ +_View Notebook on Github_
\ No newline at end of file diff --git a/docs/v1/scripts/use_notebook.js b/docs/v1/scripts/use_notebook.js index 1edcd5d05..c6cb50dd1 100644 --- a/docs/v1/scripts/use_notebook.js +++ b/docs/v1/scripts/use_notebook.js @@ -3,6 +3,7 @@ async function loadContent(div_element) { try { const fileName = div_element.getAttribute('data-content-file'); const response = await fetch(fileName); + if (!response.ok) throw new Error('Network response was not ok'); div_element.innerHTML = await response.text(); } catch (error) { @@ -13,7 +14,7 @@ async function loadContent(div_element) { // Load content when the page is fully loaded window.onload = function() { const divs = document.querySelectorAll('div[data-content-file]'); - divs.forEach(div => { - loadContent(div); + divs.forEach(async div => { + await loadContent(div); }); }; \ No newline at end of file