diff --git a/src/utils/notifications.ts b/src/utils/notifications.ts index 3119a2b..eb23755 100644 --- a/src/utils/notifications.ts +++ b/src/utils/notifications.ts @@ -18,7 +18,7 @@ export async function registerForPushNotificationsAsync() { }); } - if (Device.isDevice) { + if (Device.isDevice && Platform.OS !== "web") { const { status: existingStatus } = await Notifications.getPermissionsAsync(); let finalStatus = existingStatus; @@ -50,6 +50,6 @@ export async function registerForPushNotificationsAsync() { handleRegistrationError(`${e}`); } } else { - handleRegistrationError("Must use physical device for push notifications"); + throw new Error("Must use physical device for push notifications"); } }