From 2a02678533971b296bd12f2c750ec1c52727824a Mon Sep 17 00:00:00 2001 From: herr kaste Date: Wed, 30 Mar 2016 20:48:34 +0200 Subject: [PATCH] Remove custom effects from within another effect without breaking. When an effect loop is running, we cannot simply modify (mutate!) the effects array without breaking the for-loop. So we defer the mutating to a microtask. --- src/lib/bind/accessors.html | 4 +++- src/standard/effectBuilder.html | 31 +++++++++++++++++-------- src/standard/notify-path.html | 10 ++++---- test/unit/bind.html | 41 +++++++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 14 deletions(-) diff --git a/src/lib/bind/accessors.html b/src/lib/bind/accessors.html index 2290344114..9419a9c6cc 100644 --- a/src/lib/bind/accessors.html +++ b/src/lib/bind/accessors.html @@ -79,7 +79,9 @@ _effectEffects: function(property, value, effects, old, fromAbove) { for (var i=0, l=effects.length, fx; (i