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

Make passed focusTrapOptions immutable #35

Merged
merged 1 commit into from May 26, 2021

Conversation

simonihmig
Copy link
Contributor

Recent CI runs of ember-bootstrap for Ember canary and beta started to fail because of deprecations, raised by mutating the {{hash}} object inside of this modifier when it is used to pass focusTrapOptions as in https://github.com/josemarluedke/ember-focus-trap#with-focus-trap-options. This deprecation was recently added to Ember in emberjs/ember.js#19548. The change here treats that object as immutable.

Recent CI runs of ember-bootstrap for Ember canary and beta started to fail because of deprecations, raised by mutating the `{{hash}}` object inside of this modifier when it is used to pass `focusTrapOptions` as in https://github.com/josemarluedke/ember-focus-trap#with-focus-trap-options. This deprecation was recently added to Ember in emberjs/ember.js#19548. The change here treats that object as immutable.
@simonihmig
Copy link
Contributor Author

Ah btw, I didn't add a test here because that scenario is basically already covered by https://github.com/josemarluedke/ember-focus-trap/blob/main/tests/integration/modifiers/focus-trap-test.js#L36. It's just that for now this is only a deprecation. You could setup tests to throw on a deprecation, but that comes with its own drawbacks (failing CI due to deprecations in dependencies), and seems at least out of scope for this PR.

@josemarluedke josemarluedke merged commit 28e0be4 into josemarluedke:main May 26, 2021
backspace added a commit to cardstack/cardstack that referenced this pull request Jul 25, 2022
backspace added a commit to cardstack/cardstack that referenced this pull request Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants