From 35c8e3637f3583fccf76777333a006e8e06604ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Sat, 4 Jul 2026 15:41:02 +0200 Subject: [PATCH] fix: fix check for appending iframe-worker polyfill (#785) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Timothée Mazzucotelli --- python/zensical/config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/zensical/config.py b/python/zensical/config.py index 1730c9b..53daab0 100644 --- a/python/zensical/config.py +++ b/python/zensical/config.py @@ -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(