-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): Do not run
setup
for integration on client multiple times (
#10116) Currently, if you do: ```js const myIntegration = new InboundFilters(); const myIntegration2 = new InboundFilters(); const myIntegration3 = new InboundFilters(); client.addIntegration(myIntegration); client.addIntegration(myIntegration2); client.addIntegration(myIntegration3); ``` All of these will have their `setup` hooks called, and thus they will be initialized multiple times. However, all but the last will be discarded from the client and not be accessible anymore via e.g. `getIntegration()` or similar. This used to not matter because everything was guarded through `setupOnce()` anyhow, but i would say this is more of a bug and not really expected. With this change, an integration can only be added to a client once, if you try to add it again it will noop.
- Loading branch information
Showing
2 changed files
with
35 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters