diff --git a/main.js b/main.js index 18c0be34..6167a2a5 100644 --- a/main.js +++ b/main.js @@ -450,7 +450,7 @@ function invokeActiveZooming() { const size = this.getAttribute("font-size") * scale; const hidden = hideEmblems.checked && (size < 25 || size > 300); if (hidden) this.classList.add("hidden"); else this.classList.remove("hidden"); - if (!hidden && COArenderer && this.children.length && !this.children[0].getAttribute("href")) renderGroupCOAs(this); + if (!hidden && window.COArenderer && this.children.length && !this.children[0].getAttribute("href")) renderGroupCOAs(this); }); } diff --git a/modules/coa-generator.js b/modules/coa-generator.js index 4064704b..5dbdc6dc 100644 --- a/modules/coa-generator.js +++ b/modules/coa-generator.js @@ -195,6 +195,10 @@ if (parent === "custom") parent = null; let usedPattern = null, usedTinctures = []; + // TO-DO + // test in FF + // stringify COA on save? + const t1 = P(kinship) ? parent.t1 : getTincture("field"); if (t1.includes("-")) usedPattern = t1; const coa = {t1}; diff --git a/modules/ui/style.js b/modules/ui/style.js index c26b0b4c..35aaa29d 100644 --- a/modules/ui/style.js +++ b/modules/ui/style.js @@ -709,7 +709,7 @@ function applyStyleOnLoad() { stylePreset.value = preset; stylePreset.dataset.old = preset; } else { - preset && ERROR && console.error(`Style preset ${preset} is not available in localStorage, applying default style`); + if (preset !== "styleDefault" && ERROR) console.error(`Style preset ${preset} is not available in localStorage, applying default style`); stylePreset.value = "styleDefault"; stylePreset.dataset.old = preset; applyDefaultStyle();