Closed kenju closed 7 years ago
@ljharb Thank you for reviewing.
@goatslacker I would appreciate if you take time to review this PR 🙏
@kenju would you mind rebasing on the command line, so there's no merge commits in the PR?
@ljharb Sure! I did ( also squashed first commit, which was just returning null, into one commit).
So we don't change the semantics can we just return undefined from each?
@goatslacker the warning is because the promises being created are being thrown away - the best practice is to let every promise be consumed by something. Is there a problem with returning a promise here?
return null
in Promise then callback to suppress Bluebird warning.Though this is not required by ES6 Promise specification, this repo should comply to Bluebird best practice unless using it. Otherwise redundant log is printed out into console in development, which is annoying and have nothing to do with hypernova or its users:
Documents
From Bluebird: http://bluebirdjs.com/docs/warning-explanations.html#warning-a-promise-was-created-in-a-handler-but-was-not-returned-from-it