Skip to content

Commit 4298564

Browse files
format
1 parent e353a9f commit 4298564

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/lib/run.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,12 @@ async function run(
181181
if (!reqPath) {
182182
console.error("Request path is empty");
183183
webServer?.send(reqId, {
184-
status: 404,
185-
body: "Please provide full path of the file",
186-
});
184+
status: 404,
185+
body: "Please provide full path of the file",
186+
});
187187
return;
188188
}
189189

190-
191-
192190
const ext = Url.extname(reqPath);
193191
let url = null;
194192

@@ -490,7 +488,7 @@ async function run(
490488
}
491489

492490
function removePrefix(str, prefix) {
493-
return str.startsWith(prefix) ? str.slice(prefix.length) : str;
491+
return str.startsWith(prefix) ? str.slice(prefix.length) : str;
494492
}
495493

496494
/**
@@ -499,7 +497,7 @@ async function run(
499497
function openBrowser() {
500498
/** @type {string} */
501499
const filePath = pathName + filename;
502-
let path = removePrefix(removePrefix(filePath, addedFolder[0].url),"/");
500+
let path = removePrefix(removePrefix(filePath, addedFolder[0].url), "/");
503501
const src = `http://localhost:${port}/${path}`;
504502
if (target === "browser") {
505503
system.openInBrowser(src);

0 commit comments

Comments
 (0)