Logic cleanup

This commit is contained in:
Sam Potts 2018-06-13 00:56:31 +10:00
parent 0ecf7e3854
commit 5dddf8b0ec
5 changed files with 19 additions and 23 deletions

18
dist/plyr.js vendored
View File

@ -2820,19 +2820,17 @@ function parseUrl(input) {
// Convert object to URLSearchParams
function buildUrlParams(input) {
if (!is.object(input)) {
return '';
}
var params = new URLSearchParams();
Object.entries(input).forEach(function (_ref) {
var _ref2 = slicedToArray(_ref, 2),
key = _ref2[0],
value = _ref2[1];
if (is.object(input)) {
Object.entries(input).forEach(function (_ref) {
var _ref2 = slicedToArray(_ref, 2),
key = _ref2[0],
value = _ref2[1];
params.set(key, value);
});
params.set(key, value);
});
}
return params;
}

2
dist/plyr.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -27,18 +27,16 @@ export function parseUrl(input, safe = true) {
// Convert object to URLSearchParams
export function buildUrlParams(input) {
if (!is.object(input)) {
return '';
}
const params = new URLSearchParams();
Object.entries(input).forEach(([
key,
value,
]) => {
params.set(key, value);
});
if (is.object(input)) {
Object.entries(input).forEach(([
key,
value,
]) => {
params.set(key, value);
});
}
return params;
}