Skip to content

Commit

Permalink
fix: js error when no user
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland authored Sep 9, 2024
1 parent 18b2a4e commit 81dbe54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/src/forum/extenders/extendCommentPost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function extendCommentPost() {
if (app.forum.attribute<boolean>('fof-geoip.showFlag')) {
const ipInfo = this.attrs.post.ip_info?.();
const postUser = this.attrs.post.user();
if (postUser && postUser.preferences().showIPCountry && ipInfo) {
if (postUser && postUser?.preferences?.().showIPCountry && ipInfo) {
const { image } = getIPData(ipInfo);
if (image) {
items.add('country', image, 100);
Expand Down

0 comments on commit 81dbe54

Please sign in to comment.