Skip to content

Commit

Permalink
fix slab#1029
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen authored and Tim McClure committed Dec 12, 2016
1 parent fbde315 commit 24b4d8b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/quill.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,14 @@ function modify(source, index, shift, modifier) {
}
let range = this.getSelection();
change = modifier();
if (shift === null) {
range = shiftRange(range, index, change, source);
} else if (shift !== 0) {
range = shiftRange(range, index, shift, source);
if (range != null) {
if (shift === null) {
range = shiftRange(range, index, change, source);
} else if (shift !== 0) {
range = shiftRange(range, index, shift, source);
}
this.setSelection(range, Emitter.sources.SILENT);
}
this.setSelection(range, Emitter.sources.SILENT);
return change;
}

Expand Down

0 comments on commit 24b4d8b

Please sign in to comment.