From f52daad91c5c2b258880a2afcea7a624c41f195e Mon Sep 17 00:00:00 2001 From: Marquis Kurt Date: Wed, 27 May 2020 10:46:24 -0400 Subject: [PATCH 1/3] Return out of notif toggle when browser is unsupported Signed-off-by: Marquis Kurt --- src/pages/Settings.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/Settings.tsx b/src/pages/Settings.tsx index 565b5a8..64a766d 100644 --- a/src/pages/Settings.tsx +++ b/src/pages/Settings.tsx @@ -218,6 +218,7 @@ class SettingsPage extends Component { * is in `"default"` state, get the permission request first. */ togglePushNotifications() { + if (!browserSupportsNotificationRequests()) { return; } if (Notification.permission === "default") { getNotificationRequestPermission() .then(permission => { From 5bf6fce1dad0de7bade88e1982266288b3f77779 Mon Sep 17 00:00:00 2001 From: Marquis Kurt Date: Wed, 27 May 2020 10:57:03 -0400 Subject: [PATCH 2/3] Run Prettier on files that missed Prettier check Signed-off-by: Marquis Kurt --- src/pages/Settings.tsx | 4 +++- src/utilities/settings.tsx | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/Settings.tsx b/src/pages/Settings.tsx index 64a766d..ed5960d 100644 --- a/src/pages/Settings.tsx +++ b/src/pages/Settings.tsx @@ -218,7 +218,9 @@ class SettingsPage extends Component { * is in `"default"` state, get the permission request first. */ togglePushNotifications() { - if (!browserSupportsNotificationRequests()) { return; } + if (!browserSupportsNotificationRequests()) { + return; + } if (Notification.permission === "default") { getNotificationRequestPermission() .then(permission => { diff --git a/src/utilities/settings.tsx b/src/utilities/settings.tsx index 3e97fac..dbfcd0a 100644 --- a/src/utilities/settings.tsx +++ b/src/utilities/settings.tsx @@ -148,7 +148,7 @@ export async function getConfig(): Promise { if ( !location.endsWith("/") && - (location !== "desktop" && location !== "dynamic") + location !== "desktop" && location !== "dynamic" ) { console.info( "Location does not have a forward slash, so Hyperspace has added it automatically." From e6826e08d80ac70dcfc584a7dbdd9413f3235cca Mon Sep 17 00:00:00 2001 From: Marquis Kurt Date: Wed, 27 May 2020 11:14:22 -0400 Subject: [PATCH 3/3] Run Prettier for the umptillionth time Signed-off-by: Marquis Kurt --- src/utilities/settings.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utilities/settings.tsx b/src/utilities/settings.tsx index dbfcd0a..4b79119 100644 --- a/src/utilities/settings.tsx +++ b/src/utilities/settings.tsx @@ -148,7 +148,8 @@ export async function getConfig(): Promise { if ( !location.endsWith("/") && - location !== "desktop" && location !== "dynamic" + location !== "desktop" && + location !== "dynamic" ) { console.info( "Location does not have a forward slash, so Hyperspace has added it automatically."