From c0b832893bc7cf22db8cf03f7deea28f34202287 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Fri, 1 Mar 2024 13:25:18 +0100 Subject: [PATCH] Use `continue` --- ts/WoltLabSuite/Core/Bootstrap.ts | 8 ++++---- .../install/files/js/WoltLabSuite/Core/Bootstrap.js | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ts/WoltLabSuite/Core/Bootstrap.ts b/ts/WoltLabSuite/Core/Bootstrap.ts index 31f97f983b..218d2e0aad 100644 --- a/ts/WoltLabSuite/Core/Bootstrap.ts +++ b/ts/WoltLabSuite/Core/Bootstrap.ts @@ -179,21 +179,21 @@ export function setup(options: BoostrapOptions): void { } if (node.querySelector(".g-recaptcha-bubble-arrow") === null) { - return; + continue; } const iframe = node.querySelector("iframe"); if (!iframe) { - return; + continue; } const name = "a-" + iframe.name.split("-")[1]; const widget = document.querySelector(`iframe[name="${name}"]`); if (!widget) { - return; + continue; } const dialog = widget.closest("woltlab-core-dialog"); if (!dialog) { - return; + continue; } getPageOverlayContainer().append(node); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js index cba11338bc..a825090cb4 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js @@ -141,21 +141,21 @@ define(["require", "exports", "tslib", "./Core", "./Date/Picker", "./Devtools", if (!(node instanceof HTMLElement)) { continue; } - if (node.querySelectorAll(".g-recaptcha-bubble-arrow").length === 0) { - return; + if (node.querySelector(".g-recaptcha-bubble-arrow") === null) { + continue; } const iframe = node.querySelector("iframe"); if (!iframe) { - return; + continue; } const name = "a-" + iframe.name.split("-")[1]; const widget = document.querySelector(`iframe[name="${name}"]`); if (!widget) { - return; + continue; } const dialog = widget.closest("woltlab-core-dialog"); if (!dialog) { - return; + continue; } (0, PageOverlay_1.getPageOverlayContainer)().append(node); node.classList.add("g-recaptcha-container"); -- 2.20.1