Skip to content

Commit 5e13263

Browse files
committed
fix: on destroy remove the lastBootstrappedModule
If exit event was triggered twice we would try to destroy an already destroy module ref.
1 parent ea66985 commit 5e13263

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nativescript-angular/platform-common.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ export class NativeScriptPlatformRef extends PlatformRef {
260260
"nativescript-angular/platform-common.exitCallback", () => {
261261
const lastModuleRef = lastBootstrappedModule ? lastBootstrappedModule.get() : null;
262262
if (lastModuleRef) {
263+
lastBootstrappedModule = null;
264+
263265
lastModuleRef.destroy();
264266
}
265267

0 commit comments

Comments
 (0)