From 5344a23d4b46eba6c3bafa43e49a326a611bd620 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Thu, 2 Dec 2021 04:00:44 -0500 Subject: [PATCH] Cast to any when getting pointerEnabled/msPointerEnabled properties (#1174) These have been removed in recent TypeScript versions, and so we may get "does not exist" errors. Closes: #1164 --- src/nouislider.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nouislider.ts b/src/nouislider.ts index 155451d0..c3e8c940 100644 --- a/src/nouislider.ts +++ b/src/nouislider.ts @@ -424,13 +424,13 @@ function getPageOffset(doc: Document): PageOffset { function getActions(): { start: string; move: string; end: string } { // Determine the events to bind. IE11 implements pointerEvents without // a prefix, which breaks compatibility with the IE10 implementation. - return window.navigator.pointerEnabled + return (window.navigator as any).pointerEnabled ? { start: "pointerdown", move: "pointermove", end: "pointerup" } - : window.navigator.msPointerEnabled + : (window.navigator as any).msPointerEnabled ? { start: "MSPointerDown", move: "MSPointerMove",