This commit is contained in:
Timothy J. Baek 2024-08-07 02:18:29 +02:00
parent d692649bac
commit 5904ef86f2

View File

@ -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,