Skip to content

assignTags cannot be safely called twice #460

Open
@aiwilliams

Description

@aiwilliams

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 the tags

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions