# Discourse throws "ember:19818 Error: Assertion Failed: calling set on destroyed object"

**URL:** https://meta.discourse.org/t/discourse-throws-ember-19818-error-assertion-failed-calling-set-on-destroyed-object/76536
**Category:** Bug
**Created:** [December 21, 2017, 5:20am UTC](https://meta.discourse.org/t/discourse-throws-ember-19818-error-assertion-failed-calling-set-on-destroyed-object/76536 "2017-12-21T05:20:43Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Sudaraka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sudaraka/32/68401_2.png) [@Sudaraka](https://meta.discourse.org/u/Sudaraka)
#### Post date: [December 21, 2017, 5:20am UTC](https://meta.discourse.org/t/discourse-throws-ember-19818-error-assertion-failed-calling-set-on-destroyed-object/76536/1 "2017-12-21T05:20:43Z")

</div>

When I add a reply to a post stream in my local discourse instance, this error is thrown in the console although the new post is added to the post stream perfectly.

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/6/661ace560a249e00bb1d76ab9d5ecc100daedfbb.png)

The error is thrown only if we submit the post before the composer saves the draft

---

<div class="post-metadata">

### Author: ![Sudaraka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sudaraka/32/68401_2.png) [@Sudaraka](https://meta.discourse.org/u/Sudaraka)
#### Post date: [December 22, 2017, 6:31am UTC](https://meta.discourse.org/t/discourse-throws-ember-19818-error-assertion-failed-calling-set-on-destroyed-object/76536/2 "2017-12-22T06:31:52Z")

</div>

It seemes the errors are thrown from following codelines  
[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/components/d-editor.js.es6#L282](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/components/d-editor.js.es6#L282)

[https://github.com/discourse/discourse/blob/master/plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js.es6#L76](https://github.com/discourse/discourse/blob/master/plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js.es6#L76)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [December 22, 2017, 7:34pm UTC](https://meta.discourse.org/t/discourse-throws-ember-19818-error-assertion-failed-calling-set-on-destroyed-object/76536/4 "2017-12-22T19:34:23Z")

</div>

Thanks for reporting this issue. This should fix it 🍓

[https://github.com/discourse/discourse/commit/779efd923563b852ba1d135902abd3c9a0fa3e6c](https://github.com/discourse/discourse/commit/779efd923563b852ba1d135902abd3c9a0fa3e6c)

---

<div class="post-metadata">

### Author: ![Sudaraka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sudaraka/32/68401_2.png) [@Sudaraka](https://meta.discourse.org/u/Sudaraka)
#### Post date: [December 22, 2017, 7:58pm UTC](https://meta.discourse.org/t/discourse-throws-ember-19818-error-assertion-failed-calling-set-on-destroyed-object/76536/5 "2017-12-22T19:58:36Z")

</div>

Its always a pleasure to contribute for Discourse 😊

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 22, 2017, 8:09pm UTC](https://meta.discourse.org/t/discourse-throws-ember-19818-error-assertion-failed-calling-set-on-destroyed-object/76536/6 "2017-12-22T20:09:50Z")

</div>


