FIX: stricter window.navigator.share check (#7037)

FIX: stricter window.navigator.share check (#7037)

diff --git a/app/assets/javascripts/discourse/lib/pwa-utils.js.es6 b/app/assets/javascripts/discourse/lib/pwa-utils.js.es6
index fc4d896..ff53576 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)

GitHub sha: 994a09e5