mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-07 08:02:50 +01:00
fix: sometimes summary is null/undefined
fixes
TypeError: Cannot read properties of null (reading 'replace')
at /home/saas/nodebb/src/activitypub/mocks.js:202:24
This commit is contained in:
@@ -191,7 +191,7 @@ Mocks.profile = async (actors) => {
|
||||
const iconBackgrounds = await user.getIconBackgrounds();
|
||||
let bgColor = Array.prototype.reduce.call(preferredUsername, (cur, next) => cur + next.charCodeAt(), 0);
|
||||
bgColor = iconBackgrounds[bgColor % iconBackgrounds.length];
|
||||
|
||||
summary = summary || '';
|
||||
// Replace emoji in summary
|
||||
if (tag && Array.isArray(tag)) {
|
||||
tag
|
||||
|
||||
Reference in New Issue
Block a user