From aa96812713be61fbeeff60b69c88bbc0e85b3258 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sun, 19 Nov 2017 22:48:51 -0500 Subject: [PATCH] rAF is related to timeupdate, not currentTime specifically --- src/generators/dom/visitors/Element/addBindings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generators/dom/visitors/Element/addBindings.ts b/src/generators/dom/visitors/Element/addBindings.ts index 026541bbf0..c551deea29 100644 --- a/src/generators/dom/visitors/Element/addBindings.ts +++ b/src/generators/dom/visitors/Element/addBindings.ts @@ -216,7 +216,7 @@ export default function addBindings( // fire too infrequently, so we need to take matters into our // own hands let animation_frame; - if (group.bindings.find(binding => binding.name === 'currentTime')) { + if (group.events[0] === 'timeupdate') { animation_frame = block.getUniqueName(`${node.var}_animationframe`); block.addVariable(animation_frame); }