Skip to content

Commit 2e41393

Browse files
committed
refactor: . Inline taskWasNotOnLastLine
1 parent 6806483 commit 2e41393

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Commands/ToggleDone.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ export const toggleDone = (checking: boolean, editor: Editor, view: MarkdownView
3838
const insertion = toggleLine(line, path);
3939

4040
const replacementTextIsNonEmpty = insertion.text.length > 0;
41-
const taskWasNotOnLastLine = lineNumber < editor.lineCount() - 1;
42-
const taskIsOnLastLine = !taskWasNotOnLastLine;
41+
const taskIsOnLastLine = !(lineNumber < editor.lineCount() - 1);
4342
if (replacementTextIsNonEmpty || taskIsOnLastLine) {
4443
editor.setLine(lineNumber, insertion.text);
4544
} else {

0 commit comments

Comments
 (0)