ajax: use Object.entries

pull/1441/head
Simon Legner 1 year ago
parent a2e74712d3
commit 228090ad83

@ -59,14 +59,12 @@ var serializeData = function (options) {
};
var serializeParams = (params) =>
(() => {
const result = [];
for (var key in params) {
var value = params[key];
result.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);
}
return result;
})().join("&");
Object.entries(params)
.map(
([key, value]) =>
`${encodeURIComponent(key)}=${encodeURIComponent(value)}`,
)
.join("&");
var applyCallbacks = function (xhr, options) {
if (!options.async) {

Loading…
Cancel
Save