From 7008b489edb4d27ee1e2cf864ff939fc114acbbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Thu, 5 Sep 2024 20:37:51 +1000 Subject: [PATCH 1/2] Fix example code --- WebInstall/explainer_same_domain.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/WebInstall/explainer_same_domain.md b/WebInstall/explainer_same_domain.md index 1bd10af7..ff8dad11 100644 --- a/WebInstall/explainer_same_domain.md +++ b/WebInstall/explainer_same_domain.md @@ -84,10 +84,11 @@ To install a web site/app, the site/app would use the promise-based method`navig /* simple example of using navigator.install */ const installApp = async () => { - try{ + try { const value = await navigator.install('content_id_123'); + } catch(err){ + console.error(err.message); } - catch(err){console.error(err.message)} }; ``` From a2e39d57d16087a22e1626c964849033c57758fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Thu, 5 Sep 2024 20:38:51 +1000 Subject: [PATCH 2/2] Update WebInstall/explainer_same_domain.md --- WebInstall/explainer_same_domain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebInstall/explainer_same_domain.md b/WebInstall/explainer_same_domain.md index ff8dad11..c9919adc 100644 --- a/WebInstall/explainer_same_domain.md +++ b/WebInstall/explainer_same_domain.md @@ -86,7 +86,7 @@ To install a web site/app, the site/app would use the promise-based method`navig const installApp = async () => { try { const value = await navigator.install('content_id_123'); - } catch(err){ + } catch(err) { console.error(err.message); } };