Remove line breaks in arrays

This commit is contained in:
Albin Larsson
2018-06-13 22:18:57 +02:00
parent 99ac8d4c52
commit 6bff6b317d
12 changed files with 30 additions and 135 deletions

View File

@ -172,10 +172,7 @@ class Plyr {
// Get attributes from URL and set config
if (url.searchParams.length) {
const truthy = [
'1',
'true',
];
const truthy = ['1', 'true'];
if (truthy.includes(url.searchParams.get('autoplay'))) {
this.config.autoplay = true;
@ -682,12 +679,7 @@ class Plyr {
return;
}
let quality = ([
!is.empty(input) && Number(input),
this.storage.get('quality'),
config.selected,
config.default,
]).find(is.number);
let quality = [!is.empty(input) && Number(input), this.storage.get('quality'), config.selected, config.default].find(is.number);
if (!options.includes(quality)) {
const value = closest(options, quality);