Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ function _preferredTypeLegacy (ext, type0, type1) {
var score1 = type1 ? SOURCE_RANK.indexOf(db[type1].source) : 0

if (
exports.types[extension] !== 'application/octet-stream' &&
exports.types[ext] !== 'application/octet-stream' &&
(score0 > score1 ||
(score0 === score1 &&
exports.types[extension]?.slice(0, 12) === 'application/'))
exports.types[ext]?.slice(0, 12) === 'application/'))
) {
return type0
}
Expand Down