logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: c6db416ff70724cd19898fdc91feac6f539b10f3
parent: b00cb2aed3634ad6624e144b99d538eb85c58c12
Author: unarist <m.unarist@gmail.com>
Date:   Fri, 26 May 2017 21:07:48 +0900

Fix "Cannot read property" on missing status (#3322)

I've found this issue when I clicked replies to muted user on the timeline.

Properties I've removed in here were added with lazy loading using
IntersectionObserver (8e4d1cba), but those statuses are not need to be
tracked anyway because it will be rendered as only empty div.

Diffstat:

Mapp/javascript/mastodon/components/status.js2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js @@ -111,7 +111,7 @@ class Status extends ImmutablePureComponent { const { isHidden } = this.state; if (status === null) { - return <div ref={this.handleRef} data-id={status.get('id')} />; + return null; } if (isIntersecting === false && isHidden) {