Skip to content

Commit 3f9eb40

Browse files
thorsteinssoncyril-sf
authored andcommitted
Don't send count if the object is destroyed (emberjs#884)
1 parent 7c10eb2 commit 3f9eb40

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

ember_debug/deprecation-debug.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ export default EmberObject.extend(PortMixin, {
6262
},
6363

6464
sendPending() {
65+
if (this.isDestroyed) {
66+
return;
67+
}
68+
6569
let deprecations = A();
6670

6771
let promises = all(this.get('deprecationsToSend').map(deprecation => {
@@ -105,6 +109,10 @@ export default EmberObject.extend(PortMixin, {
105109
},
106110

107111
sendCount() {
112+
if (this.isDestroyed) {
113+
return;
114+
}
115+
108116
this.sendMessage('count', {
109117
count: this.get('deprecations.length') + this.get('deprecationsToSend.length')
110118
});

0 commit comments

Comments
 (0)