Skip to content

Commit

Permalink
Fixed error propagation bug
Browse files Browse the repository at this point in the history
Made the call to callback unconditional, so that you don't have to
wait forever until your callback gets invoked if anything goes wrong. ;)
  • Loading branch information
Tony Ivanov committed Nov 18, 2018
1 parent 12bafdd commit d139637
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions views/topics.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ module.exports = function (lvl) {
if (!channel) return
this.ready(function () {
lvl.get('channel!topic!' + channel, (err, topic) => {
if (!err && topic) {
cb(null, topic)
}
cb(err, topic)
})
})
},
Expand Down

0 comments on commit d139637

Please sign in to comment.