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] Add return statement for extend. #11603

Merged
merged 1 commit into from
Jun 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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