Changeset - c560a5789512
[Not reviewed]
Mads Kiilerich - 11 years ago 2014-07-03 01:03:28
madski@unity3d.com
rhodecode.js: pyroute, don't iterate over req_params, make for loop over its length
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/public/js/rhodecode.js
Show inline comments
 
@@ -291,26 +291,26 @@ var pyroutes = (function() {
 
                }
 
            }
 

	
 
            return result;
 
        },
 
        'register': function(route_name, route_tmpl, req_params) {
 
            if (typeof(req_params) != 'object') {
 
                req_params = [];
 
            }
 
            //fix escape
 
            route_tmpl = unescape(route_tmpl);
 
            keys = [];
 
            for (o in req_params){
 
                keys.push(req_params[o])
 
            for (var i=0; i < req_params.length; i++) {
 
                keys.push(req_params[i])
 
            }
 
            matchlist[route_name] = [
 
                route_tmpl,
 
                keys
 
            ]
 
        },
 
        '_routes': function(){
 
            return matchlist;
 
        }
 
    }
 
})();
 

	
0 comments (0 inline, 0 general)