Ignore getZoom errors (#604)

This commit is contained in:
toasted-nutbread 2020-06-14 15:14:47 -04:00 committed by GitHub
parent b612bd8b8d
commit b4a617cac3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,8 +65,12 @@ class Frontend {
async prepare() { async prepare() {
try { try {
await this.updateOptions(); await this.updateOptions();
try {
const {zoomFactor} = await api.getZoom(); const {zoomFactor} = await api.getZoom();
this._pageZoomFactor = zoomFactor; 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); window.addEventListener('resize', this._onResize.bind(this), false);