Skip to content

Commit 9c48341

Browse files
committed
fix: bug with multiple charts on same page
Fix #3207
1 parent 7722abc commit 9c48341

File tree

1 file changed

+6
-6
lines changed
  • modules/blox-tailwind/layouts/_shortcodes

1 file changed

+6
-6
lines changed

modules/blox-tailwind/layouts/_shortcodes/chart.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
{{ $id := delimit (shuffle (seq 1 9)) "" }}
1313
<div id="chart-{{$id}}" class="chart"></div>
1414
<script>
15-
async function fetchChartJSON() {
16-
console.debug('Hugo Blox fetching chart JSON...')
17-
const response = await fetch('{{$json}}');
18-
return await response.json();
19-
}
20-
2115
(function() {
16+
async function fetchChartJSON() {
17+
console.debug('Hugo Blox fetching chart JSON...')
18+
const response = await fetch('{{$json}}');
19+
return await response.json();
20+
}
21+
2222
let a = setInterval( function() {
2323
if ( typeof window.Plotly === 'undefined' ) {
2424
console.debug('Plotly not loaded yet...')

0 commit comments

Comments
 (0)