From 930de9aeb7fa25537a7b7ff1106fd95659c4e4b7 Mon Sep 17 00:00:00 2001 From: Eugene Date: Sat, 2 May 2020 22:48:30 +0200 Subject: [PATCH] Update src/browser/ScreenDprMonitor.ts Co-authored-by: Daniel Imms --- src/browser/ScreenDprMonitor.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/browser/ScreenDprMonitor.ts b/src/browser/ScreenDprMonitor.ts index 6bd4857e..27ae231f 100644 --- a/src/browser/ScreenDprMonitor.ts +++ b/src/browser/ScreenDprMonitor.ts @@ -49,9 +49,7 @@ export class ScreenDprMonitor extends Disposable { } // Clear listeners for old DPR - if (this._resolutionMediaMatchList) { - this._resolutionMediaMatchList.removeListener(this._outerListener); - } + this._resolutionMediaMatchList?.removeListener(this._outerListener); // Add listeners for new DPR this._currentDevicePixelRatio = window.devicePixelRatio;