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

Commit d67e24a

Browse files
committed
fix scroller on threads, handling of null mentions or with no value
1 parent ba1cbdb commit d67e24a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/scroller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function Scroller (scroller, content, render, opts) {
4444
entries.forEach(entry => {
4545
if (entry.isIntersecting) {
4646
visibleObserver.unobserve(entry.target)
47-
onceIdle(() => opts.onItemVisible(entry.target))
47+
onceIdle(() => opts.onItemVisible && opts.onItemVisible(entry.target))
4848
}
4949
})
5050
}, {

sbot/mentions-feed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ exports.init = function (ssb, config) {
120120
}
121121

122122
function checkBump (msg, { id }) {
123-
if (msg.value.author !== id) {
123+
if (msg && msg.value && msg.value.author !== id) {
124124
if (Array.isArray(msg.value.content.mentions) && msg.value.content.mentions.some(mention => {
125125
return mention && mention.link === id
126126
})) {

0 commit comments

Comments
 (0)