1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/components/modal-leave-editor.js
Kevin Ansfield e73920eee8 🐛 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()
});