File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ const { promisify } = require('util')
44const { types, extensions } = require ( 'mime-types' )
55const readdir = promisify ( fs . readdir )
66const HTTPError = require ( './http-error' )
7+ const pathUtil = require ( 'path' )
78
89/*
910 * A ResourceMapper maintains the mapping between HTTP URLs and server filenames,
@@ -78,9 +79,8 @@ class ResourceMapper {
7879
7980 // Determine the URL by chopping off everything after the dollar sign
8081 const pathname = this . _removeDollarExtension ( path )
81- console . log ( pathname )
8282 const url = `${ this . resolveUrl ( hostname ) } ${
83- pathname . split ( '/' ) . map ( ( component ) => encodeURIComponent ( component ) ) . join ( '/' )
83+ pathname . split ( pathUtil . sep ) . map ( ( component ) => encodeURIComponent ( component ) ) . join ( '/' )
8484 } `
8585 return { url, contentType : this . _getContentTypeByExtension ( path ) }
8686 }
You can’t perform that action at this time.
0 commit comments