fix: code split fails with common module (#4151)

This commit is contained in:
Sami Mazouz 2025-01-03 15:16:37 +01:00 committed by GitHub
parent 38e1b49cc1
commit 5d26485c04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -140,12 +140,12 @@ class RegisterAsyncChunksPlugin {
if (
!chunkModuleMemory[sourceChunkId].includes(urlPath) &&
!RegisterAsyncChunksPlugin.registry[`${chunkId}:${moduleId}:${namespace}`]?.includes(urlPath)
!RegisterAsyncChunksPlugin.registry[`${sourceChunkId}:${chunkId}:${moduleId}:${namespace}`]?.includes(urlPath)
) {
reg.push(`flarum.reg.addChunkModule('${chunkId}', '${moduleId}', '${namespace}', '${urlPath}');`);
chunkModuleMemory[sourceChunkId].push(urlPath);
RegisterAsyncChunksPlugin.registry[`${chunkId}:${moduleId}:${namespace}`] ||= [];
RegisterAsyncChunksPlugin.registry[`${chunkId}:${moduleId}:${namespace}`].push(urlPath);
RegisterAsyncChunksPlugin.registry[`${sourceChunkId}:${chunkId}:${moduleId}:${namespace}`] ||= [];
RegisterAsyncChunksPlugin.registry[`${sourceChunkId}:${chunkId}:${moduleId}:${namespace}`].push(urlPath);
}
});