Skip to content

Commit bd9d73c

Browse files
longgtlonggt
longgt
authored andcommitted
fix: remove module from ModuleLoader cache map on promise reject call back when loading chunk failed
1 parent 0182014 commit bd9d73c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/util/module-loader.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ export class ModuleLoader {
3333
if (!promise) {
3434
promise = this._ngModuleLoader.load(splitString[0], splitString[1]);
3535
this._promiseMap.set(modulePath, promise);
36+
promise.catch(() => {
37+
this._promiseMap.delete(modulePath);
38+
});
3639
}
3740

3841
return promise.then(loadedModule => {

0 commit comments

Comments
 (0)