Skip to content

Commit 2ac1820

Browse files
authored
applyChangeToValue handle null (#1)
signavio#629
2 parents 7c3d765 + 0637d5b commit 2ac1820

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/applyChangeToValue.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ const applyChangeToValue = (
1313
let oldPlainTextValue = getPlainText(value, config)
1414

1515
let lengthDelta = oldPlainTextValue.length - plainTextValue.length
16-
if (selectionStartBefore === 'undefined') {
16+
if (selectionStartBefore === null) {
1717
selectionStartBefore = selectionEndAfter + lengthDelta
1818
}
1919

20-
if (selectionEndBefore === 'undefined') {
20+
if (selectionEndBefore === null) {
2121
selectionEndBefore = selectionStartBefore
2222
}
2323

0 commit comments

Comments
 (0)