Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: on destroy remove the lastBootstrappedModule
If exit event was triggered twice we would try to destroy an already destroy module ref.
  • Loading branch information
m-abs committed Mar 8, 2019
commit 5e13263389ae0c97cd4f92693a11ba38884fc5a9
2 changes: 2 additions & 0 deletions nativescript-angular/platform-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ export class NativeScriptPlatformRef extends PlatformRef {
"nativescript-angular/platform-common.exitCallback", () => {
const lastModuleRef = lastBootstrappedModule ? lastBootstrappedModule.get() : null;
if (lastModuleRef) {
lastBootstrappedModule = null;

lastModuleRef.destroy();
}

Expand Down