style: Format code
parent
71d2368ca4
commit
249344bd03
2
index.js
2
index.js
|
@ -156,7 +156,7 @@ app.use((req, res, next) => {
|
|||
function relative(...paths) {
|
||||
const finalPath = paths.reduce((a, b) => path.join(a, b), process.cwd());
|
||||
if (path.relative(process.cwd(), finalPath).startsWith("..")) {
|
||||
throw new Error("Failed to resolve path outside of the working directory")
|
||||
throw new Error("Failed to resolve path outside of the working directory");
|
||||
}
|
||||
return finalPath;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue