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: provide default value in forRoot() method #11

Merged
merged 1 commit into from
Dec 19, 2020

Conversation

beeman
Copy link
Contributor

@beeman beeman commented Dec 19, 2020

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines: CONTRIBUTING.md#commit
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[X] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Currently, when using DialogModule.forRoot() without any parameters, the dialog pops pup but can't close, it get the following error message:

ERROR TypeError: Cannot read property 'onClose' of undefined

You can find a repro here. When adding an empty object to forRoot(), it works as expected.

Issue Number: N/A

What is the new behavior?

This patch adds a default empty object.

Does this PR introduce a breaking change?

[ ] Yes
[X] No

Other information

@NetanelBasal NetanelBasal merged commit d0ac702 into ngneat:master Dec 19, 2020
@NetanelBasal
Copy link
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants