From a489b504a41ab2beeb7aee647c9485d9c55a8cab Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Mon, 7 Nov 2022 05:33:07 -0800 Subject: [PATCH] viewer: hide share errors --- src/components/Viewer.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/Viewer.vue b/src/components/Viewer.vue index dfdc3e83..d6007494 100644 --- a/src/components/Viewer.vue +++ b/src/components/Viewer.vue @@ -661,7 +661,14 @@ export default class Viewer extends Mixins(GlobalMixin) { if (!(navigator).canShare(data)) { throw new Error(this.t("memories", "Cannot share this type of data")); } - await navigator.share(data); + + try { + await navigator.share(data); + } catch (e) { + // Don't show this error because it's silly stuff + // like "share canceled" + console.error(e); + } } catch (err) { console.error(err.name, err.message); showError(err.message);