Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
fix(accordion): coerce to boolean
Browse files Browse the repository at this point in the history
- Coerce `toggleClass` argument to boolean due to jQuery ignoring
  `undefined`

Closes #4385
  • Loading branch information
inukshuk authored and wesleycho committed Sep 9, 2015
1 parent cf92eae commit b864aa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/accordion/accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse'])
scope.openClass = attrs.openClass || 'panel-open';
scope.panelClass = attrs.panelClass;
scope.$watch('isOpen', function(value) {
element.toggleClass(scope.openClass, value);
element.toggleClass(scope.openClass, Boolean(value));
if (value) {
accordionCtrl.closeOthers(scope);
}
Expand Down

0 comments on commit b864aa9

Please sign in to comment.