From 60b0a393ed7029e142a1e336112b78452e59b657 Mon Sep 17 00:00:00 2001 From: Kuuuube <61125188+Kuuuube@users.noreply.github.com> Date: Wed, 17 Jul 2024 21:03:47 -0400 Subject: [PATCH] Prevent popup scaling from throwing errors constantly (#1241) --- ext/js/app/popup.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/js/app/popup.js b/ext/js/app/popup.js index 50e2fca914..3c730cbca8 100644 --- a/ext/js/app/popup.js +++ b/ext/js/app/popup.js @@ -330,7 +330,9 @@ export class Popup extends EventDispatcher { async setContentScale(scale) { this._contentScale = scale; this._frame.style.fontSize = `${scale}px`; - await this._invokeSafe('displaySetContentScale', {scale}); + if (this._frameClient !== null && this._frameClient.isConnected() && this._frame.contentWindow !== null) { + await this._invokeSafe('displaySetContentScale', {scale}); + } } /**