diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-04-10 16:35:43 -0400 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-04-18 14:23:34 -0400 |
commit | f50aee1021179411322f67c5951eb35de81c5174 (patch) | |
tree | a2836a41f1473905075fafb809f1e46d5dc74275 /ext/mixed | |
parent | e1ebfb02f724518432b2e1c5ec2a80ff03b38fd8 (diff) |
Only return the cached value if it uses a valid source
Diffstat (limited to 'ext/mixed')
-rw-r--r-- | ext/mixed/js/audio-system.js | 4 |
1 files changed, 3 insertions, 1 deletions
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}; + } } } |