diff --git a/assets/js/details-polyfill-detect.js b/assets/js/details-polyfill-detect.js index 0a4fcb3..19fc744 100644 --- a/assets/js/details-polyfill-detect.js +++ b/assets/js/details-polyfill-detect.js @@ -1,10 +1,5 @@ -const needsPolyfill = () => { - if (typeof Promise === 'function') return false - if (document.querySelector('details') !== null) return false - return true -} - -if (needsPolyfill()) { +if (typeof Promise !== "function" && + document.querySelector('details') !== null) { const script = '