Skip to content

Bug: ItemBuilder.addUrl drops label of ItemUrls  #119

Open
@cze-aeb

Description

@cze-aeb

Your environment

SDK Version: 1.4.1

Connect Server Version: not relevant

OS: Win 11

Node Version: 20.18.0

What happened?

When using ItemBuilder.addUrl(url: ItemUrls) the label of the provided ItemUrls is dropped, because the builder only tracks a list of URLs and which of them is the primary.

What did you expect to happen?

The label of URLs is not dropped when using ItemBuilder.addUrl

Steps to reproduce

const item = new ItemBuilder()
    .setCategory(CategoryEnum.Login)
    .addUrl({
        primary: true,
        label: '1Password',
        href: '1password.com'
    })
    .build();

console.log(item.urls[0].label); // prints undefined

Notes & Logs

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