diff options
author | Sam Potts <sam@potts.es> | 2019-06-21 00:12:10 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-21 00:12:10 +1000 |
commit | 95092edc93d713b927c637cefc27945f8537d565 (patch) | |
tree | 27464f2f98a519f78ff3cc4a2c49ebdd5c6dab2c /src/js/utils/style.js | |
parent | 1e761e237aceb49b29291946a39eef958d6da966 (diff) | |
parent | c4b3e0672e86f2a2786f315bf8f54250cd1f7f78 (diff) | |
download | plyr-95092edc93d713b927c637cefc27945f8537d565.tar.lz plyr-95092edc93d713b927c637cefc27945f8537d565.tar.xz plyr-95092edc93d713b927c637cefc27945f8537d565.zip |
Merge pull request #1472 from sampotts/develop
v3.5.5
Diffstat (limited to 'src/js/utils/style.js')
-rw-r--r-- | src/js/utils/style.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/js/utils/style.js b/src/js/utils/style.js index 6f3069c9..941db8f2 100644 --- a/src/js/utils/style.js +++ b/src/js/utils/style.js @@ -27,15 +27,8 @@ export function reduceAspectRatio(ratio) { } export function getAspectRatio(input) { - const parse = ratio => { - if (!validateRatio(ratio)) { - return null; - } - - return ratio.split(':').map(Number); - }; - - // Provided ratio + const parse = ratio => (validateRatio(ratio) ? ratio.split(':').map(Number) : null); + // Try provided ratio let ratio = parse(input); // Get from config |