sdk
sdk copied to clipboard
`assignTags` cannot be safely called twice
When the function processes values in a map of key/value pairs, when the value is a boolean, it will add the name of the tag to the entity's tags
array, such as:
const tagMap = { Owner: 'true' };
assignTags(entity, tagMap);
// entity.tags === ['Owner']
When the function is called twice, in situations where there are two or more sources of tags, it will overwrite the tags
property when that boolean trick has been triggered.
- [ ] Add to existing
tags
values - [ ] A second call with
{ Owner: 'false' }
does not need to remove'Owner'
from thetags