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 committed Nov 20, 2015
1 parent cfed401 commit b831b6e
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 @@ -556,6 +556,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 b831b6e

Please sign in to comment.