We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent faeeceb commit 808425fCopy full SHA for 808425f
1 file changed
services/libs/common/src/member.ts
@@ -33,7 +33,17 @@ export async function setAttributesDefaultValues(
33
;(attributes[attributeName] as any).default =
34
attributes[attributeName][highestPriorityPlatform]
35
} else {
36
- delete attributes[attributeName]
+ // Only delete if there is no existing non-empty default value.
37
+ // An attribute with only a `default` key and no platform-specific keys
38
+ // has no source platform to derive from, but its value should be preserved.
39
+ const existingDefault = (attributes[attributeName] as any).default
40
+ if (
41
+ existingDefault === undefined ||
42
+ existingDefault === null ||
43
+ String(existingDefault).trim().length === 0
44
+ ) {
45
+ delete attributes[attributeName]
46
+ }
47
}
48
49
0 commit comments