Skip to content

Commit

Permalink
fix(runtime): window 对象属性覆盖兼容非 Taro 构建环境 (#9065)
Browse files Browse the repository at this point in the history
  • Loading branch information
xughv authored Apr 8, 2021
1 parent 7428aaf commit 5592731
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-runtime/src/bom/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (!isBrowser) {
})
}

if (process.env.TARO_ENV !== 'h5') {
if (process.env.TARO_ENV && process.env.TARO_ENV !== 'h5') {
(window as any).requestAnimationFrame = raf;
(window as any).cancelAnimationFrame = caf;
(window as any).getComputedStyle = getComputedStyle
Expand Down

0 comments on commit 5592731

Please sign in to comment.