fix(image-writer): Remove use of _.isError

`_.isError()` returns `true` for anything that has a `name` and `message`
property, causing the check here to always keep the plain object as error.

Change-Type: patch
This commit is contained in:
Jonas Hermsmeier 2018-04-18 17:44:14 +02:00
parent 347932b213
commit c225dd89c6
No known key found for this signature in database
GPG Key ID: 1B870F801A0CEE9F

View File

@ -118,7 +118,7 @@ exports.performWrite = (image, drives, onProgress) => {
return new Bluebird((resolve, reject) => {
ipc.server.on('error', (error) => {
terminateServer()
const errorObject = _.isError(error) ? error : errors.fromJSON(error)
const errorObject = errors.fromJSON(error)
reject(errorObject)
})