From b4a617cac3dea5f5efcd95514fa680fbcd7dd9fb Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 14 Jun 2020 15:14:47 -0400 Subject: Ignore getZoom errors (#604) --- ext/fg/js/frontend.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js index a263f3e6..70bd8a48 100644 --- a/ext/fg/js/frontend.js +++ b/ext/fg/js/frontend.js @@ -65,8 +65,12 @@ class Frontend { async prepare() { try { await this.updateOptions(); - const {zoomFactor} = await api.getZoom(); - this._pageZoomFactor = zoomFactor; + try { + const {zoomFactor} = await api.getZoom(); + this._pageZoomFactor = zoomFactor; + } catch (e) { + // Ignore exceptions which may occur due to being on an unsupported page (e.g. about:blank) + } window.addEventListener('resize', this._onResize.bind(this), false); -- cgit v1.2.3