Skip to content

Commit 56c5453

Browse files
committed
using slice
1 parent 526707b commit 56c5453

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/adapter-node/src/server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ export function createServer({ render }) {
3333
}
3434

3535
if (app_dir.startsWith('/')) {
36-
app_dir = app_dir.substr(1);
36+
app_dir = app_dir.slice(1);
3737
}
3838
if (app_dir.endsWith('/')) {
39-
app_dir = app_dir.substr(0, app_dir.length - 1);
39+
app_dir = app_dir.slice(0, -1);
4040
}
4141

4242
return pathname.startsWith(`/${app_dir}/`);

0 commit comments

Comments
 (0)