mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-24 03:36:36 +00:00
fix(lib): Fix use of non-existent dependency
Change-Type: patch
This commit is contained in:
parent
5ae93bf6d0
commit
47f2336673
@ -18,8 +18,7 @@
|
||||
|
||||
const sdk = require('etcher-sdk')
|
||||
const _ = require('lodash')
|
||||
// eslint-disable-next-line node/no-extraneous-require
|
||||
const mime = require('mime')
|
||||
const mime = require('mime-types')
|
||||
const path = require('path')
|
||||
|
||||
const fileExtensions = require('./file-extensions')
|
||||
@ -40,9 +39,9 @@ exports.getCompressedExtensions = () => {
|
||||
const result = []
|
||||
for (const [ mimetype, cls ] of sdk.sourceDestination.SourceDestination.mimetypes.entries()) {
|
||||
if (cls.prototype instanceof sdk.sourceDestination.CompressedSource) {
|
||||
const mtype = mime.getExtension(mimetype)
|
||||
if (mtype !== null) {
|
||||
result.push(mtype)
|
||||
const extension = mime.extension(mimetype)
|
||||
if (extension !== null) {
|
||||
result.push(extension)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user