From d47d7dd7e0ad5779667a63533cac3857b0bc1f84 Mon Sep 17 00:00:00 2001 From: Ryan Florence Date: Fri, 10 Oct 2014 10:47:53 -0600 Subject: [PATCH] [fixed] potential infinite loop during transitions fixes #117 --- modules/components/Routes.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/components/Routes.js b/modules/components/Routes.js index 28c6131419..d2c363d750 100644 --- a/modules/components/Routes.js +++ b/modules/components/Routes.js @@ -151,11 +151,10 @@ function runHooks(hooks, callback) { } function updateMatchComponents(matches, refs) { - var i = 0, component; - while (component = refs.__activeRoute__) { - matches[i++].component = component; - refs = component.refs; - } + matches.forEach(function (match) { + match.component = refs.__activeRoute__; + refs = match.component.refs; + }); } function returnNull() {