Skip to content

Commit c8a6eb4

Browse files
committed
update prefix content
1 parent 6f6628e commit c8a6eb4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

js/logger.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@
1818
const file = line.getFileName();
1919
if (file && !file.includes("node:") && !file.includes("js/logger.js") && !file.includes("node_modules")) {
2020
const filename = file.replace(/.*\/(.*).js/, "$1");
21-
return styleText("grey", `[${filename}]`);
21+
const filepath = file.replace(/.*\/(.*)\/.*.js/, "$1");
22+
if (filepath === "js") {
23+
return styleText("grey", `[${filename}]`);
24+
} else {
25+
return styleText("grey", `[${filepath}]`);
26+
}
2227
}
2328
}
2429
} catch (err) {

0 commit comments

Comments
 (0)