Skip to content

Commit

Permalink
fix null bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed Feb 15, 2016
1 parent 67a1ac2 commit 017935d
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 @@ -56,7 +56,9 @@ class Toolbar extends Module {
}

update() {
let formats = this.quill.getFormat();
let range = this.quill.getSelection();
if (range == null) return;
let formats = this.quill.getFormat(range);
this.controls.forEach(function(pair) {
let [format, input] = pair;
if (input.tagName === 'SELECT') {
Expand Down

0 comments on commit 017935d

Please sign in to comment.