Skip to content

Commit 5344a23

Browse files
authored
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
1 parent 607c472 commit 5344a23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/nouislider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,13 +424,13 @@ function getPageOffset(doc: Document): PageOffset {
424424
function getActions(): { start: string; move: string; end: string } {
425425
// Determine the events to bind. IE11 implements pointerEvents without
426426
// a prefix, which breaks compatibility with the IE10 implementation.
427-
return window.navigator.pointerEnabled
427+
return (window.navigator as any).pointerEnabled
428428
? {
429429
start: "pointerdown",
430430
move: "pointermove",
431431
end: "pointerup"
432432
}
433-
: window.navigator.msPointerEnabled
433+
: (window.navigator as any).msPointerEnabled
434434
? {
435435
start: "MSPointerDown",
436436
move: "MSPointerMove",

0 commit comments

Comments
 (0)