remove settimeout fallback (#1093)

This commit is contained in:
Zacharias Enochsson 2022-05-12 14:49:41 +02:00 committed by GitHub
parent e93e6fd56d
commit ffafc680a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -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))
}
}