File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ unreleased
1717 - perf: enable strict mode
1818 - perf: remove unnecessary array allocations
1919 * perf: enable strict mode
20+ * perf: remove argument reassignment
2021
21221.9.3 / 2015-05-14
2223==================
Original file line number Diff line number Diff line change @@ -46,9 +46,6 @@ function serveStatic(root, options) {
4646 // copy options object
4747 var opts = Object . create ( options || null )
4848
49- // resolve root to absolute
50- root = resolve ( root )
51-
5249 // default redirect
5350 var redirect = opts . redirect !== false
5451
@@ -62,7 +59,7 @@ function serveStatic(root, options) {
6259
6360 // setup options for send
6461 opts . maxage = opts . maxage || opts . maxAge || 0
65- opts . root = root
62+ opts . root = resolve ( root )
6663
6764 return function serveStatic ( req , res , next ) {
6865 if ( req . method !== 'GET' && req . method !== 'HEAD' ) {
You can’t perform that action at this time.
0 commit comments