Chore: some minor changes

This commit is contained in:
SukkaW
2024-12-22 12:16:50 +08:00
parent af04018be9
commit d87c01ce5a
8 changed files with 20 additions and 20 deletions

View File

@@ -145,7 +145,7 @@ async function transformRuleset(parentSpan: Span, sourcePath: string, relativePa
if (res === $skip) return;
const id = basename;
const [type] = relativePath.slice(0, -extname.length).split(path.sep);
const type = relativePath.slice(0, -extname.length).split(path.sep)[0];
if (type !== 'ip' && type !== 'non_ip') {
throw new TypeError(`Invalid type: ${type}`);