Skip to content
Snippets Groups Projects
Commit fb3dc00d authored by unarist's avatar unarist Committed by Eugen Rochko
Browse files

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.
parent e573bb09
No related branches found
No related tags found
No related merge requests found
......@@ -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);
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment