Skip to content

Commit

Permalink
Always attempt to re-render when the window is resized
Browse files Browse the repository at this point in the history
  • Loading branch information
developit committed Jun 22, 2021
1 parent a9f40df commit b0a980c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1068,11 +1068,9 @@ function init() {
Object.defineProperties(window.CSS2Properties.prototype, propDescs);
}

if (!resizeObserver) {
addEventListener('resize', () => {
processItem('[data-css-paint]', true);
});
}
addEventListener('resize', () => {
processItem('[data-css-paint]');
});

const OPTS = { passive: true };

Expand Down

0 comments on commit b0a980c

Please sign in to comment.