Skip to content

Commit 669f044

Browse files
committed
fix: userOnline can render as null, causing the page to break
1 parent 34d0eb6 commit 669f044

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

framework/core/js/src/forum/components/PostUser.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ export default class PostUser extends Component {
6868

6969
items.add('avatar', avatar(user, { className: 'PostUser-avatar' }), 100);
7070

71-
items.add('userOnline', userOnline(user), 90);
71+
const onlineIndicator = userOnline(user);
72+
if (onlineIndicator) {
73+
items.add('userOnline', onlineIndicator, 90);
74+
}
7275

7376
items.add('username', username(user), 80);
7477

0 commit comments

Comments
 (0)