Skip to content

Commit d47d7dd

Browse files
committed
[fixed] potential infinite loop during transitions
fixes #117
1 parent 82eeb70 commit d47d7dd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

modules/components/Routes.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,10 @@ function runHooks(hooks, callback) {
151151
}
152152

153153
function updateMatchComponents(matches, refs) {
154-
var i = 0, component;
155-
while (component = refs.__activeRoute__) {
156-
matches[i++].component = component;
157-
refs = component.refs;
158-
}
154+
matches.forEach(function (match) {
155+
match.component = refs.__activeRoute__;
156+
refs = match.component.refs;
157+
});
159158
}
160159

161160
function returnNull() {

0 commit comments

Comments
 (0)