mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-05 18:34:39 +03:00
383b657e7e
No issue -Call notifications.closePassive after the resolution of the promise that generates the notifications. Otherwise multiple promises can stack up after notifications have been cleared, which results in a bunch of stacked notifications. -Remove some unnecessary propagation of rejected promises from action handlers that can result in unhandled reject errors.
20 lines
550 B
JavaScript
20 lines
550 B
JavaScript
import EditorControllerMixin from 'ghost/mixins/editor-base-controller';
|
|
|
|
var EditorNewController = Ember.ObjectController.extend(EditorControllerMixin, {
|
|
actions: {
|
|
/**
|
|
* Redirect to editor after the first save
|
|
*/
|
|
save: function () {
|
|
var self = this;
|
|
this._super().then(function (model) {
|
|
if (model.get('id')) {
|
|
self.transitionToRoute('editor.edit', model);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|
|
export default EditorNewController;
|