Skip to content

Commit 5fd4489

Browse files
committed
Integrate with #355
1 parent 61cf896 commit 5fd4489

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/middleware.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ module.exports = function wrapper(context) {
7373
let contentType = mime.getType(filename) || '';
7474
const mimeInfo = mimeDb[contentType];
7575
const charset = (mimeInfo && mimeInfo.charset)
76-
// Special-cased text/html to prevent possible breaking change.
76+
// Special-cased text/html & empty to prevent possible breaking change.
7777
// TODO: remove the following line in next major release.
78-
|| (contentType === 'text/html' && 'UTF-8');
78+
|| ((contentType === 'text/html' || !contentType) && 'UTF-8');
7979

8080
if (charset) {
8181
contentType += `; charset=${charset}`;

0 commit comments

Comments
 (0)