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 }