summaryrefslogtreecommitdiffhomepage
path: root/gui/src/shared/notifications
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/shared/notifications')
-rw-r--r--gui/src/shared/notifications/error.ts4
-rw-r--r--gui/src/shared/notifications/no-valid-key.ts2
2 files changed, 3 insertions, 3 deletions
diff --git a/gui/src/shared/notifications/error.ts b/gui/src/shared/notifications/error.ts
index d580bf1f1e..c5f15482dc 100644
--- a/gui/src/shared/notifications/error.ts
+++ b/gui/src/shared/notifications/error.ts
@@ -45,7 +45,7 @@ export class ErrorNotificationProvider
function getMessage(errorDetails: IErrorState, accountExpiry?: string): string {
if (errorDetails.blockFailure) {
if (errorDetails.cause.reason === 'set_firewall_policy_error') {
- switch (process.platform) {
+ switch (process.platform ?? window.platform) {
case 'win32':
return messages.pgettext(
'notifications',
@@ -86,7 +86,7 @@ function getMessage(errorDetails: IErrorState, accountExpiry?: string): string {
'Could not configure IPv6. Disable it in the app or enable it on your device.',
);
case 'set_firewall_policy_error':
- switch (process.platform) {
+ switch (process.platform ?? window.platform) {
case 'win32':
return messages.pgettext(
'notifications',
diff --git a/gui/src/shared/notifications/no-valid-key.ts b/gui/src/shared/notifications/no-valid-key.ts
index d1b90095e2..8da145a1f0 100644
--- a/gui/src/shared/notifications/no-valid-key.ts
+++ b/gui/src/shared/notifications/no-valid-key.ts
@@ -14,7 +14,7 @@ export class NoValidKeyNotificationProvider implements InAppNotificationProvider
public mayDisplay() {
const usingWireGuard =
this.context.tunnelProtocol === 'wireguard' ||
- (this.context.tunnelProtocol === 'any' && process.platform !== 'win32');
+ (this.context.tunnelProtocol === 'any' && (process.platform ?? window.platform) !== 'win32');
const keyInvalid =
this.context.wireGuardKey.type === 'key-not-set' ||
this.context.wireGuardKey.type === 'too-many-keys' ||