mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: don't send custom fields in remote user actor object if no value is entered
This commit is contained in:
@@ -200,15 +200,15 @@ Mocks.actors.user = async (uid) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const attachment = [];
|
const attachment = [];
|
||||||
if (fields.length) {
|
fields.forEach(({ name, value }) => {
|
||||||
fields.forEach(({ name, value }) => {
|
if (value) {
|
||||||
attachment.push({
|
attachment.push({
|
||||||
type: 'PropertyValue',
|
type: 'PropertyValue',
|
||||||
name,
|
name,
|
||||||
value,
|
value,
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'@context': [
|
'@context': [
|
||||||
|
|||||||
Reference in New Issue
Block a user