diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index d2182ea3b..8f0585355 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -128,12 +128,13 @@
{{end}}
// draw graph in hidden // not working
+ const containerModal = document.getElementById("graph-container-modal")
+ // retry if the graph is not ready
+ if (!containerModal) return requestAnimationFrame(render)
+ // clear the graph in case there is anything within it
+ containerModal.textContent = ""
+
- // const containerModal = document.getElementById("graph-container-modal")
- // // retry if the graph is not ready
- // if (!containerModal) return requestAnimationFrame(render)
- // // clear the graph in case there is anything within it
- // containerModal.textContent = ""
drawGraph(
{{strings.TrimRight "/" .Site.BaseURL}},