# "composer was opened without a draft key"

**URL:** <https://meta.discourse.org/t/composer-was-opened-without-a-draft-key/76851>\
**Category:** Bug\
**Created:** [28 Diciembre, 2017 00:45 UTC](https://meta.discourse.org/t/composer-was-opened-without-a-draft-key/76851 "2017-12-28T00:45:02Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)\
**Post date:** [6 Febrero, 2018 13:49 UTC](https://meta.discourse.org/t/composer-was-opened-without-a-draft-key/76851/10 "2018-02-06T13:49:05Z")

</div>

So this is coming from here:

[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/routes/discovery-categories.js.es6#L15](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/routes/discovery-categories.js.es6#L15)

`const style = !this.site.mobileView && this.siteSettings.desktop_category_page_style;`

So on mobile we are calling `promise = CategoryList.listForParent(this.store, parentCategory);` while on desktop we are calling `promise = this._loadCategoriesAndLatestTopics();` which is effectively setting the draft\_key: [https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/routes/discovery-categories.js.es6#L49](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/routes/discovery-categories.js.es6#L49)

I went with this easy fix:

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

As I didn’t want to refactor the whole `discovery-categories` file, do you think that should be enough @sam ?

---

_[View the full topic](https://meta.discourse.org/t/composer-was-opened-without-a-draft-key/76851)._
