diff options
author | Albin Larsson <mail@albinlarsson.com> | 2018-06-19 00:24:27 +0200 |
---|---|---|
committer | Albin Larsson <mail@albinlarsson.com> | 2018-06-19 03:35:57 +0200 |
commit | 94055f0772c6c5febcfe1e35714ae3e88afaaf35 (patch) | |
tree | ab2a1076c7e9df0624a4df7d7b05ff029c9898e2 /src/js/html5.js | |
parent | c45f428f616aeff04deb25515a1bf97224294a24 (diff) | |
download | plyr-94055f0772c6c5febcfe1e35714ae3e88afaaf35.tar.lz plyr-94055f0772c6c5febcfe1e35714ae3e88afaaf35.tar.xz plyr-94055f0772c6c5febcfe1e35714ae3e88afaaf35.zip |
Replace filter()[0] with find()
Diffstat (limited to 'src/js/html5.js')
-rw-r--r-- | src/js/html5.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/js/html5.js b/src/js/html5.js index 6aa96f4c..3c9f1030 100644 --- a/src/js/html5.js +++ b/src/js/html5.js @@ -39,7 +39,7 @@ const html5 = { get() { // Get sources const sources = html5.getSources.call(player); - const [source] = sources.filter(source => source.getAttribute('src') === player.source); + const source = sources.find(source => source.getAttribute('src') === player.source); // Return size, if match is found return source && Number(source.getAttribute('size')); |