mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-04 10:14:36 +02:00
Possible fix for issue #1004
This commit is contained in:
parent
0ef2a2e4b6
commit
022c506eda
1 changed files with 8 additions and 1 deletions
|
@ -20,7 +20,14 @@ 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 {
|
||||
let result = JSON.parse(probeData.join(''))
|
||||
resolve(result);
|
||||
} catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue