From af7bc0f7ce686147608256e1c5dd0a9d24388945 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 24 May 2023 00:50:04 +0200 Subject: [PATCH] Fix: set share capability to 'no' if running from console, fixes tests --- Logic/State/UserRelatedState.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Logic/State/UserRelatedState.ts b/Logic/State/UserRelatedState.ts index ceccfc2fd8..bd130cf1b4 100644 --- a/Logic/State/UserRelatedState.ts +++ b/Logic/State/UserRelatedState.ts @@ -259,7 +259,7 @@ export default class UserRelatedState { _theme: layout?.id, _backend: this.osmConnection.Backend(), _applicationOpened: new Date().toISOString(), - _supports_sharing: window.navigator.share ? "yes" : "no" + _supports_sharing: (typeof window === "undefined") ? "no" : (window.navigator.share ? "yes" : "no") }) for (const key in Constants.userJourney) {