mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-11-08 17:14:18 +01:00
commit
f851cde1f4
@ -20,7 +20,13 @@ module.exports = (function () {
|
||||
|
||||
proc.on('exit', code => { exitCode = code })
|
||||
proc.on('error', err => reject(err))
|
||||
proc.on('close', () => resolve(JSON.parse(probeData.join(''))))
|
||||
proc.on('close', () => {
|
||||
try {
|
||||
resolve(JSON.parse(probeData.join('')))
|
||||
} catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user