From 42e31e875e4a4ea17753be1a084745d86ca29a89 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Thu, 7 Oct 2021 14:07:13 +0530 Subject: fix: defensive programming to avoid js error --- src/stores/ServicesStore.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/stores') diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index ce6675866..e27567e8f 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js @@ -888,6 +888,7 @@ export default class ServicesStore extends Store { return this.actions.todos.reload(); } + if (!service.webview) return; return service.webview.loadURL(service.url); } @@ -995,7 +996,7 @@ export default class ServicesStore extends Store { const service = this.one(serviceId); if (service.isTodosService) { this.actions.todos.openDevTools(); - } else { + } else if (service.webview) { service.webview.openDevTools(); } } @@ -1147,7 +1148,7 @@ export default class ServicesStore extends Store { const { isAttached } = service; const isMuted = isAppMuted || service.isMuted; - if (isAttached) { + if (isAttached && service.webview) { service.webview.audioMuted = isMuted; } } -- cgit v1.2.3-70-g09d2