diff --git a/app/util.js b/app/util.js index d4379a1..5df8261 100644 --- a/app/util.js +++ b/app/util.js @@ -1,9 +1,11 @@ -halfmoon.showModal = id => { - const t = document.getElementById(id) - t && t.classList.add("show") -} -halfmoon.hideModal = id => { - const t = document.getElementById(id) - t && t.classList.remove("show") +if ((typeof halfmoon === "object" || typeof halfmoon === 'function') && (halfmoon !== null)) { + halfmoon.showModal = id => { + const t = document.getElementById(id) + t && t.classList.add("show") + } + halfmoon.hideModal = id => { + const t = document.getElementById(id) + t && t.classList.remove("show") + } }