Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
ydaniv committed May 9, 2024
1 parent 676841e commit e25749f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dist/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const supported = typeof window == 'undefined' ? true : "onscrollend" in window;

if (!supported) {
if (!supported && !('HR_INSTANCE' in window)) {
const scrollendEvent = new Event('scrollend');
const pointers = new Set();

Expand Down Expand Up @@ -38,7 +38,7 @@ if (!supported) {
if (type != 'scroll' && type != 'scrollend')
return;

let scrollport = this;
let scrollport = this || window;
let data = observed.get(scrollport);
if (data === undefined) {
let timeout = 0;
Expand Down Expand Up @@ -70,7 +70,7 @@ if (!supported) {
function onRemoveListener(originalFn, type, handler) {
if (type != 'scroll' && type != 'scrollend')
return;
let scrollport = this;
let scrollport = this || window;
let data = observed.get(scrollport);

// Mismatched addEventListener / removeEventListener
Expand Down

0 comments on commit e25749f

Please sign in to comment.