Skip to content

Commit

Permalink
fix indent active state
Browse files Browse the repository at this point in the history
closes #882
  • Loading branch information
jhchen committed Aug 26, 2016
1 parent e1f2a11 commit bd35765
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ class Toolbar extends Module {
} else if (input.hasAttribute('value')) {
// both being null should match (default values)
// '1' should match with 1 (headers)
input.classList.toggle('ql-active', formats[format] == input.value || (formats[format] == null && !input.value));
let isActive = formats[format] === input.getAttribute('value') ||
(formats[format] != null && formats[format].toString() === input.getAttribute('value'));
input.classList.toggle('ql-active', isActive);
} else {
input.classList.toggle('ql-active', formats[format] != null);
}
Expand Down

0 comments on commit bd35765

Please sign in to comment.