mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 09:10:25 +08:00
FIX: stricter window.navigator.share check (#7037)
This commit is contained in:
parent
2e0342dba7
commit
994a09e5e8
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue