refactor(commit.ts): replace filter callback with Boolean function call

docs(commit.ts): remove unnecessary empty line
This commit is contained in:
di-sukharev
2023-03-30 14:57:22 +08:00
parent 4b53a08653
commit f5bcf58f7b

View File

@@ -24,7 +24,7 @@ import { trytm } from '../utils/trytm';
const getGitRemotes = async () => {
const { stdout } = await execa('git', ['remote']);
return stdout.split('\n').filter((remote) => remote.trim() !== '');
return stdout.split('\n').filter((remote) => Boolean(remote.trim()));
};
const generateCommitMessageFromGitDiff = async (
@@ -207,5 +207,6 @@ export async function commit(
outro(`${chalk.red('✖')} ${generateCommitError}`);
process.exit(1);
}
process.exit(0);
}