Skip to content

Commit

Permalink
refactor: . Replace ?: with if-else - for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
claremacrae committed Mar 19, 2024
1 parent d78f1f1 commit 896ec97
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Query/Filter/Filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ export class Filter {

public simulateExplainFilter() {
const needToShowInstruction = this.instruction !== this.explanation.asString();
return needToShowInstruction ? new Explanation(this.instruction + ' =>', [this.explanation]) : this.explanation;
if (needToShowInstruction) {
return new Explanation(this.instruction + ' =>', [this.explanation]);
} else {
return this.explanation;
}
}
}

0 comments on commit 896ec97

Please sign in to comment.