fix: fix check for appending iframe-worker polyfill (#785)

Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
This commit is contained in:
Timothée Mazzucotelli
2026-07-04 13:41:02 +00:00
committed by GitHub
parent 7158eab75a
commit 35c8e3637f
+4 -2
View File
@@ -1192,12 +1192,14 @@ def _convert_plugins(value: Any, config: dict) -> dict:
# Ensure correct resolution of links when viewing the site from the
# file system by disabling directory URLs
if offline.get("enabled"):
if offline.get("enabled", True):
config["use_directory_urls"] = False
# Append iframe-worker to polyfills/shims
if not any(
"iframe-worker" in url for url in config["extra"]["polyfills"]
"iframe-worker"
in (url.get("path", "") if isinstance(url, dict) else url)
for url in config["extra"]["polyfills"]
):
script = "https://unpkg.com/iframe-worker/shim"
config["extra"]["polyfills"].append(