mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 10:21:36 +03:00
b284e2e4da
fixes https://github.com/TryGhost/Team/issues/777
- the unsaved settings modal would come back if you left a settings
sub-page with unsaved changes and then came back to the page
- if you then clicked on "Leave", Admin would crash with a Sentry error
of `Cannot read property 'finally' of undefined`
- we had a similar bug in
39c850f4fe
and the fix was to remove the `.finally` because it assumed the
confirm action returned a promise
- this commit performs a similar fix and seems to resolve the problem
15 lines
308 B
JavaScript
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()
|
|
});
|