Skip to content

Commit

Permalink
Merge pull request #53 from rwjblue/set-positionalParams-on-class
Browse files Browse the repository at this point in the history
Set `positionalParams` as a static property on the class.
  • Loading branch information
bcardarella committed Jul 31, 2015
2 parents ac99385 + 60b5943 commit 84e24bc
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions addon/components/async-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ var get = Ember.get;
var getWithDefault = Ember.getWithDefault;
var set = Ember.set;

export default Ember.Component.extend({
positionalParams: 'params',
var positionalParams = {
positionalParams: 'params'
};

var ButtonComponent = Ember.Component.extend(positionalParams, {
layout: layout,
tagName: 'button',
textState: 'default',
Expand Down Expand Up @@ -87,3 +90,11 @@ export default Ember.Component.extend({
if (tagName === 'a' && href === undefined) { return ''; }
})
});

// Ember 1.13.6 will deprecate specifying `positionalParams` on the
// instance in favor of class level property
//
// Having both defined keeps us compatible with Ember 1.13+ (all patch versions)
ButtonComponent.reopenClass(positionalParams);

export default ButtonComponent;

0 comments on commit 84e24bc

Please sign in to comment.