🐛 Fixed error when opening editor after abandoning a new tag

no issue

- the new tag that is added to the store when opening the new tag route was not being cleaned up when leaving the new tag route
- blank tags have a name value of `undefined` which causes errors when calling `localeCompare()` on them as is done when ordering tag names for display in the tags input
This commit is contained in:
Kevin Ansfield 2019-06-18 15:16:22 +01:00
parent d2d4b0f644
commit a066a505bd

View File

@ -15,7 +15,10 @@ export default AuthenticatedRoute.extend({
// reset the model so that mobile screens react to an empty selectedTag
deactivate() {
this._super(...arguments);
this.set('controller.model', null);
let {controller} = this;
controller.model.rollbackAttributes();
controller.set('model', null);
}
});