Only return the cached value if it uses a valid source

This commit is contained in:
toasted-nutbread 2020-04-10 16:35:43 -04:00
parent e1ebfb02f7
commit f50aee1021

View File

@ -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};
}
}
}