We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61cf896 commit 5fd4489Copy full SHA for 5fd4489
lib/middleware.js
@@ -73,9 +73,9 @@ module.exports = function wrapper(context) {
73
let contentType = mime.getType(filename) || '';
74
const mimeInfo = mimeDb[contentType];
75
const charset = (mimeInfo && mimeInfo.charset)
76
- // Special-cased text/html to prevent possible breaking change.
+ // Special-cased text/html & empty to prevent possible breaking change.
77
// TODO: remove the following line in next major release.
78
- || (contentType === 'text/html' && 'UTF-8');
+ || ((contentType === 'text/html' || !contentType) && 'UTF-8');
79
80
if (charset) {
81
contentType += `; charset=${charset}`;
0 commit comments