Skip to content

Commit 5c3aab8

Browse files
committed
Fix feature detection
(HTMLScriptElement.supports is available since the ~ time importmap is supported)
1 parent a34583e commit 5c3aab8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ux.symfony.com/templates/base.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</script>
2828
{% block importmap %}
2929
<script>
30-
if (!HTMLScriptElement.supports('importmap')) {
30+
if (!(HTMLScriptElement && HTMLScriptElement.supports?.('importmap'))) {
3131
document.head.appendChild(Object.assign(document.createElement("script"),{
3232
src:"https://cdn.jsdelivr.net/npm/[email protected]/dist/es-module-shims.min.js",
3333
async:true,

0 commit comments

Comments
 (0)