diff --git a/src/renderer/lib/state.js b/src/renderer/lib/state.js index bfbd1f2b00..9e2e1a5251 100644 --- a/src/renderer/lib/state.js +++ b/src/renderer/lib/state.js @@ -151,8 +151,10 @@ function setupStateSaved (cb) { }) Promise.all(tasks) - .then(() => cb(null, saved)) - .catch(err => cb(err)) + .then( + () => cb(null, saved), + err => cb(err) + ) function createTorrentObject (t) { // TODO: Doing several fs.readFileSync calls during first startup is not ideal diff --git a/src/renderer/webtorrent.js b/src/renderer/webtorrent.js index 8493cf8a67..3934ce7cab 100644 --- a/src/renderer/webtorrent.js +++ b/src/renderer/webtorrent.js @@ -358,11 +358,15 @@ function getAudioMetadata (infoHash, index) { : mm.parseStream(file.createReadStream(), file.name, options) onMetaData - .then(() => { - console.log(`metadata for file='${file.name}' completed.`) - }).catch(function (err) { - return console.log('error getting audio metadata for ' + infoHash + ':' + index, err) - }) + .then( + () => console.log(`metadata for file='${file.name}' completed.`), + err => { + console.log( + `error getting audio metadata for ${infoHash}:${index}`, + err + ) + } + ) } function selectFiles (torrentOrInfoHash, selections) {