Only return the cached value if it uses a valid source
This commit is contained in:
parent
e1ebfb02f7
commit
f50aee1021
@ -85,7 +85,9 @@ class AudioSystem {
|
|||||||
const cacheValue = this._cache.get(key);
|
const cacheValue = this._cache.get(key);
|
||||||
if (typeof cacheValue !== 'undefined') {
|
if (typeof cacheValue !== 'undefined') {
|
||||||
const {audio, uri, source} = cacheValue;
|
const {audio, uri, source} = cacheValue;
|
||||||
return {audio, uri, source};
|
if (sources.includes(source)) {
|
||||||
|
return {audio, uri, source};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user