Skip to content

Commit

Permalink
Specify window consistently with matchMedia calls in browser.ts (#164020
Browse files Browse the repository at this point in the history
)

Co-authored-by: Christof Marti <chrmarti@microsoft.com>
  • Loading branch information
a-stewart and chrmarti authored Dec 14, 2022
1 parent eb2e52b commit 682e3d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vs/base/browser/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class DevicePixelRatioMonitor extends Disposable {
private _handleChange(fireEvent: boolean): void {
this._mediaQueryList?.removeEventListener('change', this._listener);

this._mediaQueryList = matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);
this._mediaQueryList = window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);
this._mediaQueryList.addEventListener('change', this._listener);

if (fireEvent) {
Expand Down

0 comments on commit 682e3d2

Please sign in to comment.