mirror of
https://github.com/discourse/discourse.git
synced 2025-02-18 09:15:19 +00:00
FIX: stricter window.navigator.share check (#7037)
This commit is contained in:
parent
2e0342dba7
commit
994a09e5e8
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user