From 94055f0772c6c5febcfe1e35714ae3e88afaaf35 Mon Sep 17 00:00:00 2001 From: Albin Larsson Date: Tue, 19 Jun 2018 00:24:27 +0200 Subject: [PATCH] Replace filter()[0] with find() --- src/js/html5.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'));