Skip to content

Commit

Permalink
Prevent popup scaling from throwing errors constantly
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuuuube committed Jul 17, 2024
1 parent 4e581e7 commit 320dac9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ext/js/app/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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});
}
}

/**
Expand Down

0 comments on commit 320dac9

Please sign in to comment.