Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
fix small bug in notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
CelestialCrafter committed Jan 27, 2024
1 parent 8d422d4 commit 3cd3d9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/dashboard/notifications/+page.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const load = async ({ cookies }) => {
const data = jwt.verify(token, JWT_SECRET);
const user = await User.findOne({ _id: data._id });

return { registered: Boolean(user.pushSubscription) };
return { registered: Boolean(user?.pushSubscription) };
};

export const actions = {
Expand Down

0 comments on commit 3cd3d9b

Please sign in to comment.