Skip to content

Commit

Permalink
using slice
Browse files Browse the repository at this point in the history
  • Loading branch information
bjon committed Jun 16, 2021
1 parent 526707b commit 56c5453
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/adapter-node/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ export function createServer({ render }) {
}

if (app_dir.startsWith('/')) {
app_dir = app_dir.substr(1);
app_dir = app_dir.slice(1);
}
if (app_dir.endsWith('/')) {
app_dir = app_dir.substr(0, app_dir.length - 1);
app_dir = app_dir.slice(0, -1);
}

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

0 comments on commit 56c5453

Please sign in to comment.