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

[BUGFIX release] Ensure rest arg positionalParams can be omitted. #12445

Merged
merged 1 commit into from
Oct 6, 2015

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Oct 6, 2015

When specifying postionalParams like this:

App.FooBarComponent = Ember.Component.extend();

App.FooBarComponent.reopenClass({
  positionalParams: 'allTheThings'
});

You should be able to avoid using positional params by specifying allTheThings as a hash argument:

{{foo-bar allTheThings=blah}}

Unfortunately, we were triggering an assertion that you used a positional param that conflicted with a hash param. This change fixes that assertion by avoiding doing any work when no params are specified.

Fixes #12444.

When specifying `postionalParams` like this:

```javascript
App.FooBarComponent = Ember.Component.extend();

App.FooBarComponent.reopenClass({
  positionalParams: 'allTheThings'
});
```

You should be able to avoid using positional params by specifying
`allTheThings` as a hash argument:

```hbs
{{foo-bar allTheThings=blah}}
```

Unfortunately, we were triggering an assertion that you used a positional
param that conflicted with a hash param.  This change fixes that
assertion by avoiding doing any work when no params are specified.
@rwjblue rwjblue force-pushed the fix-rest-style-positional-params branch from 03cc682 to d34aa11 Compare October 6, 2015 19:45
rwjblue added a commit that referenced this pull request Oct 6, 2015
[BUGFIX release] Ensure rest arg positionalParams can be omitted.
@rwjblue rwjblue merged commit e7ba39a into emberjs:master Oct 6, 2015
@rwjblue rwjblue deleted the fix-rest-style-positional-params branch October 6, 2015 20:08
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.

Using "rest arg" version of positionalParams breaks hash only version.
1 participant