Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Ensure that msg.value is truthy
Browse files Browse the repository at this point in the history
This resolves and edge-case where a message is being passed to
checkBump. I'm unclear on *why* this is necessary, as sbot seems to be
reporting that the message doesn't exist, but it should resolve the bug.
  • Loading branch information
christianbundy committed Nov 1, 2018
1 parent 0619440 commit 0ced2c6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sbot/channel-feed.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ exports.init = function (ssb, config) {
} }


function checkBump (msg, { channel }) { function checkBump (msg, { channel }) {
if (!msg.value) return
if (msg.value.content.type === 'vote') return if (msg.value.content.type === 'vote') return
if (normalizeChannel(msg.value.content.channel) === channel) { if (normalizeChannel(msg.value.content.channel) === channel) {
if (getRoot(msg)) { if (getRoot(msg)) {
Expand Down

0 comments on commit 0ced2c6

Please sign in to comment.