Skip to content

Commit

Permalink
Revert "refactor: use object destructuring"
Browse files Browse the repository at this point in the history
This reverts commit dd44f8c.
  • Loading branch information
haoqunjiang committed Sep 21, 2018
1 parent 4d5b07a commit b0502a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/middleware.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { posix: { join } } = require('path');
const path = require('path');
const mime = require('mime');
const DevMiddlewareError = require('./DevMiddlewareError');
const { getFilenameFromUrl, handleRangeHeaders, handleRequest, ready } = require('./util');
Expand Down Expand Up @@ -52,7 +52,7 @@ module.exports = function wrapper(context) {
throw new DevMiddlewareError('next');
}

filename = join(filename, index);
filename = path.posix.join(filename, index);
stat = context.fs.statSync(filename);
if (!stat.isFile()) {
throw new DevMiddlewareError('next');
Expand Down

0 comments on commit b0502a1

Please sign in to comment.