File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,14 +131,14 @@ module.exports = CoreObject.extend({
131131 var isBrotliCompressed = brotliCompressedFilePaths . indexOf ( filePath ) !== - 1 ;
132132
133133 if ( isGzipped && path . extname ( basePath ) === '.gz' ) {
134- var basePathUngzipped = path . basename ( basePath , '.gz' ) ;
134+ var basePathUngzipped = filePath . slice ( 0 , - 3 ) ;
135135 if ( filePaths && filePaths . indexOf ( basePathUngzipped ) !== - 1 ) {
136136 contentType = mime . getType ( basePathUngzipped ) || defaultType ;
137137 encoding = this . _mimeCharsetsLookup ( contentType ) ;
138138 }
139139 }
140140 if ( isBrotliCompressed ) {
141- var basePathUncompressed = path . basename ( basePath , '.br' ) ;
141+ var basePathUncompressed = filePath . slice ( 0 , - 3 ) ;
142142 if ( filePaths && filePaths . indexOf ( basePathUncompressed ) !== - 1 ) {
143143 contentType = mime . getType ( basePathUncompressed ) || defaultType ;
144144 encoding = this . _mimeCharsetsLookup ( contentType ) ;
You can’t perform that action at this time.
0 commit comments