2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-23 11:10:34 +03:00

Fix window error on the server-side

This commit is contained in:
Sébastien Chopin
2016-11-16 22:39:15 +01:00
committed by GitHub
parent 5418e8451a
commit ba1ffc20a1
+2 -2
View File
@@ -1,6 +1,6 @@
// fallback to timers if rAF not present // fallback to timers if rAF not present
const stopUpdate = window.cancelAnimationFrame || window.clearTimeout const stopUpdate = (typeof window !== 'undefined' ? window.cancelAnimationFrame : null) || clearTimeout
const startUpdate = window.requestAnimationFrame || ((cb) => window.setTimeout(cb, 0)) const startUpdate = (typeof window !== 'undefined' ? window.requestAnimationFrame : null) || ((cb) => window.setTimeout(cb, 0))
/** /**
* Performs a batched update. Uses requestAnimationFrame to prevent * Performs a batched update. Uses requestAnimationFrame to prevent