fix: tab to replace command only shadow have value

This commit is contained in:
Anh Hồng 2022-02-25 16:20:27 +07:00
parent 208d7e3038
commit 1278fe4b03

View file

@ -88,7 +88,9 @@ var CommandPromptView = Backbone.View.extend({
if (e.keyCode === 9) { if (e.keyCode === 9) {
e.preventDefault(); e.preventDefault();
el.value = shadowEl.innerHTML.replace(/ /g, ' '); if (shadowEl.innerHTML) {
el.value = shadowEl.innerHTML.replace(/ /g, ' ');
}
} }
this.updatePrompt(el); this.updatePrompt(el);