Merge pull request #1034 from friday/remove-array-newline-rule

Suggestion: Remove array newline rule
This commit is contained in:
Sam Potts
2018-06-15 15:34:29 +10:00
committed by GitHub
13 changed files with 31 additions and 138 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);