Skip to content

Commit 36c4ddd

Browse files
committed
manually inline expression terser won't inline
1 parent 9e2d0b7 commit 36c4ddd

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,9 @@ function create(defaults) {
187187
}
188188

189189
if (options.params) {
190-
const divider = ~url.indexOf('?') ? '&' : '?';
191-
const query = options.paramsSerializer
192-
? options.paramsSerializer(options.params)
193-
: new URLSearchParams(options.params);
194-
url += divider + query;
190+
url +=
191+
(~url.indexOf('?') ? '&' : '?') +
192+
(options.paramsSerializer ? options.paramsSerializer(options.params) : new URLSearchParams(options.params));
195193
}
196194

197195
const fetchFunc = options.fetch || fetch;

0 commit comments

Comments
 (0)