From 070832864742179993c106483ab7758d034afd6f Mon Sep 17 00:00:00 2001 From: A McIlwraith Date: Mon, 15 Jul 2024 09:27:06 -0400 Subject: [PATCH] Move unobserve to unobserve all patterns after a load's ready state is done. Safe to assume that unless you're still copying the design system to some place that the result won't be any different. Since that is such an edge case a page reload should suffice. --- src/js/core/_core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/core/_core.js b/src/js/core/_core.js index 0b04f0c..8a9d545 100644 --- a/src/js/core/_core.js +++ b/src/js/core/_core.js @@ -202,10 +202,10 @@ module.exports = { let ajx = new XMLHttpRequest(); ajx.onreadystatechange = () => { if (ajx.readyState == 4) { - + + observer.unobserve(article.target); switch (ajx.status) { case 200: - observer.unobserve(article.target); a.innerHTML = a.innerHTML + ajx.responseText; switch (a.getAttribute("data-template")) {