Skip to content

Commit

Permalink
refactor: Simplify the condition used in removeBom()
Browse files Browse the repository at this point in the history
  • Loading branch information
francescomari committed Apr 12, 2022
1 parent 2c53b6f commit ef5ea00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/commands/test/iac/local-execution/file-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export async function tryLoadFileData(
}

function removeBom(s: string): string {
if (s.length > 0 && s.charCodeAt(0) === 0xfeff) {
if (s.charCodeAt(0) === 0xfeff) {
return s.slice(1);
}
return s;
Expand Down

0 comments on commit ef5ea00

Please sign in to comment.