Skip to content

Commit

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

Co-authored-by: Christof Marti <chrmarti@microsoft.com>
  • Loading branch information
2 people authored and weartist committed Dec 15, 2022
1 parent c043eba commit f6b31db
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 f6b31db

Please sign in to comment.