Skip to content

Commit 4c23d80

Browse files
committed
Tiny code simplification
Closes #1
1 parent e20184c commit 4c23d80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ module.exports = async options => {
102102

103103
let pathname = '/';
104104
if (typeof options.open === 'string') {
105-
pathname = (options.open.indexOf('/') === 0 ? '' : '/') + options.open;
105+
pathname += options.open.replace(/^\//, '');
106106
}
107107

108108
// Check when the server is ready. Tried doing it by listening

0 commit comments

Comments
 (0)