Commit 5904ef86 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

refac

parent d692649b
...@@ -39,6 +39,10 @@ ...@@ -39,6 +39,10 @@
const codeElement = document.getElementById(`code-${codeId}`); const codeElement = document.getElementById(`code-${codeId}`);
if (codeElement) { if (codeElement) {
clearInterval(interval); clearInterval(interval);
// If the code is already loaded, don't load it again
if (codeElement.innerHTML) {
return;
}
new CodeBlock({ new CodeBlock({
target: codeElement, target: codeElement,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment