Skip to content

Commit 53a5360

Browse files
fix: linting errors
1 parent d304137 commit 53a5360

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/cli/src/commands/convert.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function discoverTitles(inputDir: string): number[] {
9595
return readdirSync(inputDir)
9696
.map((name) => USC_XML_RE.exec(name))
9797
.filter((m): m is RegExpExecArray => m !== null)
98-
.map((m) => parseInt(m[1]!, 10))
98+
.map((m) => parseInt(m[1] ?? "0", 10))
9999
.sort((a, b) => a - b);
100100
}
101101

packages/usc/src/downloader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ function extractAllXmlFromZip(
338338
zipFile.on("entry", (entry: Entry) => {
339339
const match = USC_XML_RE.exec(entry.fileName);
340340
if (match) {
341-
const titleNum = parseInt(match[1]!, 10);
342-
const outPath = join(outputDir, `usc${match[1]!}.xml`);
341+
const titleNum = parseInt(match[1] ?? "0", 10);
342+
const outPath = join(outputDir, `usc${match[1] ?? "00"}.xml`);
343343
pending++;
344344

345345
extractEntry(zipFile, entry, outPath)

0 commit comments

Comments
 (0)