Skip to content

Commit 7e2e776

Browse files
committed
Fix build issue
1 parent 2444d6d commit 7e2e776

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v14.16.0
1+
v20.10.0

src/scripts/engine.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@ class Engine {
1515

1616
this.initMenuLink();
1717

18-
this.cancelAnimationFrame =
19-
(
20-
window.cancelAnimationFrame ||
21-
window.webkitCancelRequestAnimationFrame ||
22-
window.mozCancelRequestAnimationFrame ||
23-
window.oCancelRequestAnimationFrame ||
24-
window.msCancelRequestAnimationFrame
25-
)?.bind(window) || clearTimeout;
18+
const cancelAnimationFrameObj = (
19+
window.cancelAnimationFrame ||
20+
window.webkitCancelRequestAnimationFrame ||
21+
window.mozCancelRequestAnimationFrame ||
22+
window.oCancelRequestAnimationFrame ||
23+
window.msCancelRequestAnimationFrame
24+
);
25+
26+
this.cancelAnimationFrame = cancelAnimationFrameObj
27+
? cancelAnimationFrameObj.bind(window) || clearTimeout
28+
: clearTimeout;
2629
}
2730

2831
initFpsmeter() {

0 commit comments

Comments
 (0)