Skip to content

Commit 6cb5da2

Browse files
committed
refactor: . Invert inner operation (SonarQube)
1 parent 2e41393 commit 6cb5da2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Commands/ToggleDone.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +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 taskIsOnLastLine = !(lineNumber < editor.lineCount() - 1);
41+
const taskIsOnLastLine = lineNumber >= editor.lineCount() - 1;
4242
if (replacementTextIsNonEmpty || taskIsOnLastLine) {
4343
editor.setLine(lineNumber, insertion.text);
4444
} else {

0 commit comments

Comments
 (0)