Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: ItemBuilder.addUrl drops label of ItemUrls #119

Open
cze-aeb opened this issue Oct 6, 2024 · 0 comments · May be fixed by #120
Open

Bug: ItemBuilder.addUrl drops label of ItemUrls #119

cze-aeb opened this issue Oct 6, 2024 · 0 comments · May be fixed by #120
Labels
bug Something isn't working

Comments

@cze-aeb
Copy link

cze-aeb commented Oct 6, 2024

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

@cze-aeb cze-aeb added the bug Something isn't working label Oct 6, 2024
cze-aeb added a commit to cze-aeb/connect-sdk-js that referenced this issue Oct 6, 2024
cze-aeb added a commit to cze-aeb/connect-sdk-js that referenced this issue Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant