Skip to content

Commit

Permalink
fix member attribute default settings
Browse files Browse the repository at this point in the history
  • Loading branch information
garrrikkotua committed Dec 6, 2023
1 parent d012b12 commit 4d1f468
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ export default class MemberAttributeService extends LoggerBase {
}

for (const attributeName of Object.keys(attributes)) {
if (typeof attributes[attributeName] === 'string') {
try {
attributes[attributeName] = JSON.parse(attributes[attributeName] as string)
} catch (error) {
this.log.error('Failed to parse attribute value', {
attributeName,
attributeValue: attributes[attributeName],
})
}
}

const highestPriorityPlatform =
MemberAttributeService.getHighestPriorityPlatformForAttributes(
Object.keys(attributes[attributeName]),
Expand Down

0 comments on commit 4d1f468

Please sign in to comment.