Skip to content

Commit 7817d04

Browse files
committed
Prevent last_indexand parameters leak.
1 parent 3d0d3ac commit 7817d04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/routes.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
clean_path: function(path) {
4343
path = path.split("://");
44-
last_index = path.length - 1;
44+
var last_index = path.length - 1;
4545
path[last_index] = path[last_index].replace(/\/+/g, "/").replace(/\/$/m, '');
4646
return path.join("://");
4747
},
@@ -109,7 +109,7 @@
109109
throw new Error("Too many parameters provided for path");
110110
}
111111

112-
parameters = this.prepare_parameters(required_parameters, args, opts);
112+
var parameters = this.prepare_parameters(required_parameters, args, opts);
113113
// Array#indexOf is not supported by IE <= 8, so we use custom method
114114
if (Utils.smartIndexOf(optional_parts, 'format') !== -1) {
115115
this.set_default_format(parameters);

0 commit comments

Comments
 (0)