this.model.setText(this.decodeText(lines[0]));
this.stopEditingText();
this.outdent();
- } else if ((lines.length === 2 && lines[1].length === 0) || (lines.length === 3 && lines[1].length === 0 && lines[2].length === 0)) { // Line break at end
+ } else if ((lines.length === 2 && lines[1] === "") || (lines.length === 3 && lines[1] === "" && lines[2] === "")) { // Line break at end
this.model.setText(this.decodeText(lines[0]));
var emptyAfter = this.model.addTodoAfter({text: this.decodeText(lines[1])}, collection); // Child or not depending on whether this has children
this.stopEditingText();
emptyAfter.getView().startEditingText();
- } else if (lines.length === 2 && lines[0].length === 0) { // Line break at beginning
+ } else if (lines.length === 2 && lines[0] === "") { // Line break at beginning
var emptyBefore = this.model.addTodoBefore({text: this.decodeText(lines[0])}, collection);
this.model.setText(this.decodeText(lines[1]));
this.stopEditingText();
this.model.setText(this.decodeText(lines[0]));
this.stopEditingText();
this.outdent();
- } else if ((lines.length === 2 && lines[1].length === 0) || (lines.length === 3 && lines[1].length === 0 && lines[2].length === 0)) { // Line break at end
+ } else if ((lines.length === 2 && lines[1] === "") || (lines.length === 3 && lines[1] === "" && lines[2] === "")) { // Line break at end
this.model.setText(this.decodeText(lines[0]));
var emptyAfter = this.model.addTodoAfter({text: this.decodeText(lines[1])}, collection); // Child or not depending on whether this has children
this.stopEditingText();
emptyAfter.getView().startEditingText();
- } else if (lines.length === 2 && lines[0].length === 0) { // Line break at beginning
+ } else if (lines.length === 2 && lines[0] === "") { // Line break at beginning
var emptyBefore = this.model.addTodoBefore({text: this.decodeText(lines[0])}, collection);
this.model.setText(this.decodeText(lines[1]));
this.stopEditingText();
this.model.setText(this.decodeText(lines[0]));
this.stopEditingText();
this.outdent();
- } else if ((lines.length === 2 && lines[1].length === 0) || (lines.length === 3 && lines[1].length === 0 && lines[2].length === 0)) { // Line break at end
+ } else if ((lines.length === 2 && lines[1] === "") || (lines.length === 3 && lines[1] === "" && lines[2] === "")) { // Line break at end
this.model.setText(this.decodeText(lines[0]));
var emptyAfter = this.model.addTodoAfter({text: this.decodeText(lines[1])}, collection); // Child or not depending on whether this has children
this.stopEditingText();
emptyAfter.getView().startEditingText();
- } else if (lines.length === 2 && lines[0].length === 0) { // Line break at beginning
+ } else if (lines.length === 2 && lines[0] === "") { // Line break at beginning
var emptyBefore = this.model.addTodoBefore({text: this.decodeText(lines[0])}, collection);
this.model.setText(this.decodeText(lines[1]));
this.stopEditingText();