Skip to content

Commit

Permalink
[BUGFIX release] allow current-when to be a boolean emberjs#12512
Browse files Browse the repository at this point in the history
  • Loading branch information
ssured authored and Sjoerd de Jong committed Jan 15, 2016
1 parent 6de89a9 commit 41c6851
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/ember-routing-views/lib/components/link-to.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,11 @@ let LinkComponent = EmberComponent.extend({
let resolvedQueryParams = get(this, 'resolvedQueryParams');

let currentWhen = get(this, 'current-when');

if (typeof currentWhen === 'boolean') {
return currentWhen ? get(this, 'activeClass') : false;
}

let isCurrentWhenSpecified = !!currentWhen;
currentWhen = currentWhen || get(this, 'qualifiedRouteName');
currentWhen = currentWhen.split(' ');
Expand Down

0 comments on commit 41c6851

Please sign in to comment.