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

fix: Initialize the bus only if required #587

Merged
merged 1 commit into from Mar 16, 2023
Merged

fix: Initialize the bus only if required #587

merged 1 commit into from Mar 16, 2023

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Mar 8, 2023

Currently the bus is initialized when the file is imported and as the bus requires the window to be present it fails for e.g. testing without a DOM environment.

To fix this the bus is now initialized on the first usage and while the window is not present only a stub is used.

@susnux susnux added the enhancement New feature or request label Mar 8, 2023
Currently the bus is initialized when the file is imported
and as the bus requires the window to be present it fails for
e.g. testing without a DOM environment.

To fix this the bus is now initialized on the first usage
and while the window is not present only a stub is used.

Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
lib/index.ts Show resolved Hide resolved
@skjnldsv skjnldsv merged commit aefc866 into master Mar 16, 2023
@delete-merged-branch delete-merged-branch bot deleted the fix/init-later branch March 16, 2023 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants