Merge branch 'next' into components

This commit is contained in:
Leo Horie 2015-02-11 22:44:35 -05:00
commit 1ed2ffe118

View file

@ -120,7 +120,7 @@ var m = (function app(window, undefined) {
len = data.length
}
}
var nodes = [], intact = cached.length === data.length, subArrayCount = 0;
//keys algorithm: sort elements without recreating them if keys are present
@ -697,6 +697,15 @@ var m = (function app(window, undefined) {
path = path.substr(0, queryStart)
}
// Get all routes and check if there's
// an exact match for the current path
var keys = Object.keys(router);
var index = keys.indexOf(path);
if(index !== -1){
m.module(root, router[keys [index]]);
return true;
}
for (var route in router) {
if (route === path) {
m.module(root, router[route]);