Skip to content

Commit

Permalink
handle boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsantosbh committed Feb 2, 2021
1 parent e6e5761 commit 9cbff0b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@identity.com/uca",
"version": "1.0.23",
"version": "1.0.24",
"description": "Provides functionality around User Collectable Attributes (UCA)",
"main": "src/index.js",
"module": "dist/es/index.js",
Expand Down
3 changes: 3 additions & 0 deletions src/UserCollectableAttribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ class UserCollectableAttribute {
if (_.get(property, 'meta.type') === 'Number') {
fixedValue.value = _.toNumber(item.value);
}
if ((_.get(property, 'meta.type') === 'Boolean')) {
fixedValue.value = _.toString(item.value) === 'true';
}

fixedValue.name = _.get(property, 'meta.propertyName');

Expand Down

0 comments on commit 9cbff0b

Please sign in to comment.