We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 238d62c commit a26023bCopy full SHA for a26023b
src/cli.ts
@@ -40,6 +40,9 @@ export function formatFileProperties(
40
export async function getNonEmptyLinesFromFile(
41
filePath: string
42
): Promise<string[]> {
43
+ if (!filePath) {
44
+ return [];
45
+ }
46
const content = await readFile(filePath, "utf8");
47
return (
48
parseNewLineSeparatedValues(content)
@@ -51,6 +54,9 @@ export async function getNonEmptyLinesFromFile(
51
54
export async function getNonEmptyLinesFromFiles(
52
55
filePaths: string[]
53
56
57
+ if (!filePaths) {
58
59
60
const promises = filePaths.map((fp) => getNonEmptyLinesFromFile(fp));
61
const results = await Promise.all(promises);
62
return results.flat().filter(Boolean);
0 commit comments