Skip to content

Commit

Permalink
Fix double program release in base model (#1223)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsherif committed Aug 28, 2019
1 parent 5e8c810 commit 2b94e23
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions modules/core/src/lib/base-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,8 @@ export default class BaseModel {
return;
}

if (this.program) {
if (this.programManager) {
this.programManager.release(this.program);
} else {
this.program.delete();
}
if (this.program && !this.programManager) {
this.program.delete();
}

this.program = program;
Expand Down

0 comments on commit 2b94e23

Please sign in to comment.