fix(templates): fix a null check bug in template contentedtable ext

This commit is contained in:
Drew Regitsky 2016-03-10 19:06:15 -08:00
parent 50296ab2d6
commit fe11a425cd

View file

@ -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);
}
}