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: using ...attributes without passing attrs fails #24

Merged
merged 1 commit into from
Jul 11, 2018

Conversation

lennyburdette
Copy link
Contributor

Example:
A component template with:

<div ...attributes></div>

and this invocation:

<MyComponent />

fails with:

Uncaught TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Object.create (runtime-polyfill.js:99)

This invocation succeeds:

<MyComponent class="foo" />

Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome catch! Can you add a test also?

Something like this test, but with the failure scenario...

Example:
A component template with:
```hbs
<div ...attributes></div>
```
and this invocation:
```hbs
<MyComponent />
```
fails with:
```
Uncaught TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Object.create (runtime-polyfill.js:99)
```
This invocation succeeds:
```hbs
<MyComponent class="foo" />
```
@lennyburdette
Copy link
Contributor Author

Done!

@rwjblue rwjblue merged commit 5b9df66 into ember-polyfills:master Jul 11, 2018
@rwjblue
Copy link
Member

rwjblue commented Jul 11, 2018

Thank you!

@rwjblue rwjblue added the bug Something isn't working label Jul 11, 2018
@rwjblue
Copy link
Member

rwjblue commented Jul 11, 2018

ember-angle-bracket-invocation-polyfill 1.1.6 published 🎉

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 this pull request may close these issues.

2 participants