From 09b93067f4945e923a831ffe44b26938d8baee36 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Fri, 16 Oct 2026 19:25:15 +0300 Subject: [PATCH] fix close modal --- app/javascript/elements/native_modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/elements/native_modal.js b/app/javascript/elements/native_modal.js index e412c5af4..9e11c52df 100644 --- a/app/javascript/elements/native_modal.js +++ b/app/javascript/elements/native_modal.js @@ -22,7 +22,7 @@ export default class extends HTMLElement { } async flashFrom (fetchResponse) { - const html = await fetchResponse?.responseHTML + const html = await fetchResponse?.responseHTML.catch(() => null) const flash = html && new DOMParser().parseFromString(html, 'text/html').getElementById('native_flash') if (flash?.dataset.alert) return { alert: flash.dataset.alert }