fix: don't send custom fields in remote user actor object if no value is entered

This commit is contained in:
Julian Lam
2024-11-22 14:27:24 -05:00
parent ce1efd3955
commit 09f00f8e43

View File

@@ -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': [