Skip to content

Commit 2f44c72

Browse files
committed
refactor(Parser): replace logical AND with explicit if statement for action push
1 parent 798ac59 commit 2f44c72

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ export class Parser {
110110
const matched = command.match(/^(?<action>\w+)/);
111111
if (matched) {
112112
const action = matched.groups?.action;
113-
action && actions.push(action);
113+
if (action) {
114+
actions.push(action);
115+
}
114116
}
115117
});
116118
return Array.from(new Set(actions));

0 commit comments

Comments
 (0)