From b831b6e9041c9ffb9d37806fc6febd78e4d2c8fa Mon Sep 17 00:00:00 2001 From: Sjoerd de Jong Date: Fri, 20 Nov 2015 11:19:21 +0100 Subject: [PATCH] [BUGFIX release] allow current-when to be a boolean #12512 --- packages/ember-routing-views/lib/components/link-to.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/ember-routing-views/lib/components/link-to.js b/packages/ember-routing-views/lib/components/link-to.js index 7a168aaf91f..9639adc8c3a 100644 --- a/packages/ember-routing-views/lib/components/link-to.js +++ b/packages/ember-routing-views/lib/components/link-to.js @@ -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(' ');