Skip to content

Commit 402316c

Browse files
committed
simplify baseURL regex for size
1 parent 91830bd commit 402316c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ function create(defaults) {
182182
}
183183

184184
if (options.baseURL) {
185-
url = url.replace(/^(?!.*\/\/)\/?(.*)$/, options.baseURL + '/$1');
185+
url = url.replace(/^(?!.*\/\/)\/?/, options.baseURL + '/');
186186
}
187187

188188
if (options.params) {

0 commit comments

Comments
 (0)