FIX: don't pop up "cancel" when returning to topic

This commit is contained in:
Sam 2014-12-22 16:08:39 +11:00
parent a75b9db4a2
commit 9e4942eeeb

View File

@ -336,15 +336,13 @@ export default DiscourseController.extend({
// If we're already open, we don't have to do anything
if (composerModel.get('composeState') === Discourse.Composer.OPEN &&
composerModel.get('draftKey') === opts.draftKey &&
composerModel.action === opts.action) {
composerModel.get('draftKey') === opts.draftKey) {
return resolve();
}
// If it's the same draft, just open it up again.
if (composerModel.get('composeState') === Discourse.Composer.DRAFT &&
composerModel.get('draftKey') === opts.draftKey &&
composerModel.action === opts.action) {
composerModel.get('draftKey') === opts.draftKey) {
composerModel.set('composeState', Discourse.Composer.OPEN);
return resolve();