Skip to content

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

Merged
rwjblue merged 1 commit into
emberjs:masterfrom
rwjblue:fix-rest-style-positional-params
Oct 6, 2015
Merged

rwjblue merged 1 commit into
emberjs:masterfrom
rwjblue:fix-rest-style-positional-params

Conversation

@rwjblue

@rwjblue rwjblue commented Oct 6, 2015

Copy link
Copy Markdown
Member

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