From f50aee1021179411322f67c5951eb35de81c5174 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 10 Apr 2020 16:35:43 -0400 Subject: [PATCH] Only return the cached value if it uses a valid source --- ext/mixed/js/audio-system.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/mixed/js/audio-system.js b/ext/mixed/js/audio-system.js index 255a96de..0ded3490 100644 --- a/ext/mixed/js/audio-system.js +++ b/ext/mixed/js/audio-system.js @@ -85,7 +85,9 @@ class AudioSystem { const cacheValue = this._cache.get(key); if (typeof cacheValue !== 'undefined') { const {audio, uri, source} = cacheValue; - return {audio, uri, source}; + if (sources.includes(source)) { + return {audio, uri, source}; + } } }