diff --git a/website/src/components/ChartDemo.astro b/website/src/components/ChartDemo.astro index a82fd4e..929186d 100644 --- a/website/src/components/ChartDemo.astro +++ b/website/src/components/ChartDemo.astro @@ -113,7 +113,7 @@ const codeSnippet = getCodeSnippet() if (window.astrochart) { // Library already loaded — init immediately initChart() - } else if (document.querySelector('script[src="' + baseUrl + 'astrochart.js"]')) { + } else if (document.querySelector('script[src="' + baseUrl + '/astrochart.js"]')) { // Another instance is already loading the bundle — queue up window.__astrochartQueue = window.__astrochartQueue || [] window.__astrochartQueue.push(initChart) @@ -123,7 +123,7 @@ const codeSnippet = getCodeSnippet() window.__astrochartQueue.push(initChart) var script = document.createElement('script') - script.src = baseUrl + 'astrochart.js' + script.src = baseUrl + '/astrochart.js' script.onload = function () { var queue = window.__astrochartQueue || [] window.__astrochartQueue = []