summaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-06-14 15:14:47 -0400
committerGitHub <noreply@github.com>2020-06-14 15:14:47 -0400
commitb4a617cac3dea5f5efcd95514fa680fbcd7dd9fb (patch)
tree0c3790cb40949c01bcce69c3fb49dcff324341aa /ext/fg
parentb612bd8b8dc62a83e6800b052cc5f673a287dbe8 (diff)
Ignore getZoom errors (#604)
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/js/frontend.js8
1 files 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);