diff --git a/app/assets/javascripts/discourse/lib/pwa-utils.js.es6 b/app/assets/javascripts/discourse/lib/pwa-utils.js.es6 index fc4d896e688..ff53576c00b 100644 --- a/app/assets/javascripts/discourse/lib/pwa-utils.js.es6 +++ b/app/assets/javascripts/discourse/lib/pwa-utils.js.es6 @@ -1,6 +1,9 @@ export function share(data) { return new Ember.RSVP.Promise((resolve, reject) => { - if (window.location.protocol === "https:" && window.navigator.share) { + if ( + window.location.protocol === "https:" && + typeof window.navigator.share !== "undefined" + ) { window.navigator .share(data) .catch(reject)