mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-23 12:20:33 +03:00
Fix window error on the server-side
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user