Framework updates
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
28
node_modules/axios/lib/helpers/buildURL.js
generated
vendored
28
node_modules/axios/lib/helpers/buildURL.js
generated
vendored
@@ -12,11 +12,11 @@ import AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';
|
||||
* @returns {string} The encoded value.
|
||||
*/
|
||||
function encode(val) {
|
||||
return encodeURIComponent(val).
|
||||
replace(/%3A/gi, ':').
|
||||
replace(/%24/g, '$').
|
||||
replace(/%2C/gi, ',').
|
||||
replace(/%20/g, '+');
|
||||
return encodeURIComponent(val)
|
||||
.replace(/%3A/gi, ':')
|
||||
.replace(/%24/g, '$')
|
||||
.replace(/%2C/gi, ',')
|
||||
.replace(/%20/g, '+');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -33,11 +33,13 @@ export default function buildURL(url, params, options) {
|
||||
return url;
|
||||
}
|
||||
|
||||
const _encode = options && options.encode || encode;
|
||||
const _encode = (options && options.encode) || encode;
|
||||
|
||||
const _options = utils.isFunction(options) ? {
|
||||
serialize: options
|
||||
} : options;
|
||||
const _options = utils.isFunction(options)
|
||||
? {
|
||||
serialize: options,
|
||||
}
|
||||
: options;
|
||||
|
||||
const serializeFn = _options && _options.serialize;
|
||||
|
||||
@@ -46,13 +48,13 @@ export default function buildURL(url, params, options) {
|
||||
if (serializeFn) {
|
||||
serializedParams = serializeFn(params, _options);
|
||||
} else {
|
||||
serializedParams = utils.isURLSearchParams(params) ?
|
||||
params.toString() :
|
||||
new AxiosURLSearchParams(params, _options).toString(_encode);
|
||||
serializedParams = utils.isURLSearchParams(params)
|
||||
? params.toString()
|
||||
: new AxiosURLSearchParams(params, _options).toString(_encode);
|
||||
}
|
||||
|
||||
if (serializedParams) {
|
||||
const hashmarkIndex = url.indexOf("#");
|
||||
const hashmarkIndex = url.indexOf('#');
|
||||
|
||||
if (hashmarkIndex !== -1) {
|
||||
url = url.slice(0, hashmarkIndex);
|
||||
|
||||
Reference in New Issue
Block a user