Skip to content

Commit

Permalink
Merge pull request #11603 from nathanhammond/nathanhammond-fix-extend
Browse files Browse the repository at this point in the history
[BUGFIX] Add return statement for extend.
  • Loading branch information
stefanpenner committed Jun 30, 2015
2 parents 777a00d + 474fbf7 commit 0472f7a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions packages/ember-routing-htmlbars/tests/helpers/link-to_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ QUnit.test("reopening on LinkView actually reopens on LinkComponent", function()

});

QUnit.test("Extending a LinkView returns a LinkView.", function() {
expect(2);

expectDeprecation(function() {
var result = Ember.LinkView.extend({});
equal(result.toString(), '(subclass of Ember.LinkView)', 'Returns a subclass of the Ember.LinkView object.');
});
});

QUnit.test("unwraps controllers", function() {
var template = "{{#link-to 'index' view.otherController}}Text{{/link-to}}";

Expand Down
2 changes: 1 addition & 1 deletion packages/ember-routing-views/lib/views/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ DeprecatedLinkView.reopen = function reopenWithDeprecation() {
DeprecatedLinkView.reopenClass({
extend: function () {
Ember.deprecate('Ember.LinkView is deprecated. Please extend from Ember.LinkComponent.', false);
this._super.apply(this, arguments);
return this._super.apply(this, arguments);
}
});

Expand Down

0 comments on commit 0472f7a

Please sign in to comment.