remove settimeout fallback (#1093)
This commit is contained in:
parent
e93e6fd56d
commit
ffafc680a6
6
index.js
6
index.js
|
@ -7,10 +7,6 @@ var SVG_NS = "http://www.w3.org/2000/svg"
|
|||
var id = (a) => a
|
||||
var map = EMPTY_ARR.map
|
||||
var isArray = Array.isArray
|
||||
var enqueue =
|
||||
typeof requestAnimationFrame !== "undefined"
|
||||
? requestAnimationFrame
|
||||
: setTimeout
|
||||
|
||||
var createClass = (obj) => {
|
||||
var out = ""
|
||||
|
@ -380,7 +376,7 @@ export var app = ({
|
|||
if (state !== newState) {
|
||||
if ((state = newState) == null) dispatch = subscriptions = render = id
|
||||
if (subscriptions) subs = patchSubs(subs, subscriptions(state), dispatch)
|
||||
if (view && !busy) enqueue(render, (busy = true))
|
||||
if (view && !busy) requestAnimationFrame(render, (busy = true))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue