Fix: hosts parsing

This commit is contained in:
SukkaW
2023-12-11 10:58:59 +08:00
parent a0a772d2e1
commit 9e09222472
3 changed files with 17 additions and 17 deletions

View File

@@ -3,7 +3,12 @@ export const processLine = (line: string): string | null => {
return null;
}
const line_0: string = line[0];
const trimmed: string = line.trim();
if (trimmed === '') {
return null;
}
const line_0: string = trimmed[0];
if (
line_0 === '#'
@@ -15,11 +20,6 @@ export const processLine = (line: string): string | null => {
return null;
}
const trimmed: string = line.trim();
if (trimmed === '') {
return null;
}
return trimmed;
};