Browse Source

Fix unhandled promise rejection (#162)

master
Jarmo Isotalo 8 years ago
committed by GitHub
parent
commit
0e486282a0
  1. 4
      lib/index.js

4
lib/index.js

@ -404,7 +404,7 @@ export default class Now extends EventEmitter {
}
getNameservers(domain) {
return new Promise(resolve => {
return new Promise((resolve, reject) => {
let fallback = false
this.retry(async (bail, attempt) => {
@ -445,6 +445,8 @@ export default class Now extends EventEmitter {
return ns.length
})
resolve(body)
}).catch(err => {
reject(err)
})
})
}

Loading…
Cancel
Save