Ghost/ghost/admin/app/components/modal-leave-editor.js
Kevin Ansfield 39c850f4fe 🐛 Fixed sticky "Unsaved changes" modal when leaving editor
no issue
- the unsaved changes confirmation modal could re-appear after leaving the editor and re-opening the same post
- remove the `.finally` which assumed the confirm action returns a promise so that the modal is properly closed
2019-01-21 09:18:51 +00:00

15 lines
308 B
JavaScript

import ModalComponent from 'ghost-admin/components/modal-base';
import RSVP from 'rsvp';
export default ModalComponent.extend({
actions: {
confirm() {
this.confirm();
this.send('closeModal');
}
},
// Allowed actions
confirm: () => RSVP.resolve()
});