2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-05 12:32:25 +03:00

Remove window when undefined

This commit is contained in:
Sébastien Chopin
2017-03-01 14:30:07 +01:00
committed by GitHub
parent cc12722c87
commit 8ac8a34104
+1 -1
View File
@@ -1,6 +1,6 @@
// fallback to timers if rAF not present
const stopUpdate = (typeof window !== 'undefined' ? window.cancelAnimationFrame : null) || clearTimeout
const startUpdate = (typeof window !== 'undefined' ? window.requestAnimationFrame : null) || ((cb) => window.setTimeout(cb, 0))
const startUpdate = (typeof window !== 'undefined' ? window.requestAnimationFrame : null) || ((cb) => setTimeout(cb, 0))
/**
* Performs a batched update. Uses requestAnimationFrame to prevent