Skip to content

Commit

Permalink
range sometimes null
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed Oct 26, 2015
1 parent a3a434e commit 3f1b36a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/quill.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class Quill extends EventEmitter {
};
this.selection.onUpdate = (range, source = Quill.sources.USER) => {
if (source !== Quill.sources.SILENT) {
let formats = this.getFormats(range);
let formats = range != null ? this.getFormats(range) : {};
this.emit(Quill.events.SELECTION_CHANGE, range, formats, source);
}
};
Expand Down

0 comments on commit 3f1b36a

Please sign in to comment.