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 // Convert object to URLSearchParams
function buildUrlParams(input) { function buildUrlParams(input) {
if (!is.object(input)) {
return '';
}
var params = new URLSearchParams(); var params = new URLSearchParams();
Object.entries(input).forEach(function (_ref) { if (is.object(input)) {
var _ref2 = slicedToArray(_ref, 2), Object.entries(input).forEach(function (_ref) {
key = _ref2[0], var _ref2 = slicedToArray(_ref, 2),
value = _ref2[1]; key = _ref2[0],
value = _ref2[1];
params.set(key, value); params.set(key, value);
}); });
}
return params; 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 // Convert object to URLSearchParams
export function buildUrlParams(input) { export function buildUrlParams(input) {
if (!is.object(input)) {
return '';
}
const params = new URLSearchParams(); const params = new URLSearchParams();
Object.entries(input).forEach(([ if (is.object(input)) {
key, Object.entries(input).forEach(([
value, key,
]) => { value,
params.set(key, value); ]) => {
}); params.set(key, value);
});
}
return params; return params;
} }