mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-04 07:10:06 +08:00
fix(templates): fix a null check bug in template contentedtable ext
This commit is contained in:
parent
50296ab2d6
commit
fe11a425cd
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@ export default class TemplateEditor extends ContenteditableExtension {
|
|||
// Sets node contents to just its textContent, strips HTML
|
||||
codeNode.textContent = codeNode.textContent;
|
||||
|
||||
if (selIndex !== undefined) {
|
||||
if (selIndex != null) {
|
||||
editor.restoreSelectionByTextIndex(codeNode, selIndex.startIndex, selIndex.endIndex);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue