From d81b3beedaa2ac959ab7be8e3181c0a0b92e4c5b Mon Sep 17 00:00:00 2001 From: Jimmy Griffith Date: Thu, 6 Nov 2014 16:16:01 -0800 Subject: [PATCH] forEachActiveView allows view release during iteration --- src/ui/ViewPool.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/ViewPool.js b/src/ui/ViewPool.js index 610ed072..5603ef50 100644 --- a/src/ui/ViewPool.js +++ b/src/ui/ViewPool.js @@ -115,7 +115,7 @@ exports = Class(function () { this.forEachActiveView = function(fn, ctx) { var views = this._views; var f = bind(ctx, fn); - for (var i = 0, len = this._freshViewIndex; i < len; i++) { + for (var i = this._freshViewIndex - 1; i >= 0; i--) { f(views[i], i); } };