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

attributeChangedCallback triggers a duplicate fetch of a board #3

Closed
rdmurphy opened this issue Jul 2, 2022 · 1 comment · Fixed by #6
Closed

attributeChangedCallback triggers a duplicate fetch of a board #3

rdmurphy opened this issue Jul 2, 2022 · 1 comment · Fixed by #6
Labels
bug Something isn't working

Comments

@rdmurphy
Copy link
Owner

rdmurphy commented Jul 2, 2022

This is my bad — I forgot that attributeChangedCallback and connectedCallback will fire when a custom element connects.

I think the answer is to make sure the current value for this.href and the third parameter of attributeChangedCallback (often called newValue) do not match before allowing the fetch to happen.

@rdmurphy rdmurphy added the bug Something isn't working label Jul 2, 2022
@rdmurphy
Copy link
Owner Author

rdmurphy commented Jul 2, 2022

Instead going to borrow this incredibly basic approach from @github/remote-input-element and just validate whether oldValue exists or not!

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