浏览代码

Ignore AbortError when cancelled sharing (#6978)

`navigator.share()` rejects Promise if user cancelled sharing, and it may
print it as an error on JavaScript console.

This patch ignores it and prints other errors on the console.
master
unarist 6 年前
committed by Eugen Rochko
父节点
当前提交
fb3dc00dda
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. +2
    -0
      app/javascript/mastodon/components/status_action_bar.js

+ 2
- 0
app/javascript/mastodon/components/status_action_bar.js 查看文件

@@ -67,6 +67,8 @@ export default class StatusActionBar extends ImmutablePureComponent {
navigator.share({
text: this.props.status.get('search_index'),
url: this.props.status.get('url'),
}).catch((e) => {
if (e.name !== 'AbortError') console.error(e);
});
}



正在加载...
取消
保存