From 78fc31252e4adb38c05e743cf8fa165cec88af0b Mon Sep 17 00:00:00 2001 From: Arnaud Nelissen Date: Mon, 15 Jun 2026 15:47:34 +0200 Subject: [PATCH] fix(settings): guard Notification API for iOS Safari MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Notification is undefined on iOS Safari — bare access crashes on render. Added "Notification" in window check before accessing .permission. Co-Authored-By: Claude Sonnet 4.6 --- src/app/(app)/settings/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(app)/settings/page.tsx b/src/app/(app)/settings/page.tsx index 1844fd9..106601b 100644 --- a/src/app/(app)/settings/page.tsx +++ b/src/app/(app)/settings/page.tsx @@ -44,7 +44,7 @@ export default function SettingsPage() { const [thresholds, setThresholdsState] = useState(getThresholds); const [notifPermission, setNotifPermission] = useState( - typeof window !== "undefined" && Notification.permission === "granted" + typeof window !== "undefined" && "Notification" in window && Notification.permission === "granted" ); const [pushoverKey, setPushoverKey] = useState("");