diff --git a/src/plugins/cache-busted-loader-plugin.ts b/src/plugins/cache-busted-loader-plugin.ts index 4fb20b67073..e1ee78709df 100644 --- a/src/plugins/cache-busted-loader-plugin.ts +++ b/src/plugins/cache-busted-loader-plugin.ts @@ -16,13 +16,10 @@ export default class CacheBustedLoaderPlugin extends Phaser.Loader.LoaderPlugin } addFile(file): void { - if (ignoredFiles.includes(file?.key)) - return; - if (!Array.isArray(file)) - file = [ file ] - - if (cacheBuster) + file = [ file ]; + + if (!ignoredFiles.includes(file?.key) && cacheBuster) file.forEach(item => item.url += '?v=' + cacheBuster); super.addFile(file);