mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Removed unused beforeModalClose
method on design route
refs 595018098d
- method removal was missed when switching from modal to standard route
This commit is contained in:
parent
42e493bb81
commit
3345920f29
1 changed files with 0 additions and 15 deletions
|
@ -55,21 +55,6 @@ export default class SettingsDesignRoute extends AuthenticatedRoute {
|
|||
this.hasConfirmed = false;
|
||||
}
|
||||
|
||||
async beforeModalClose() {
|
||||
if (this.hasConfirmed) {
|
||||
return;
|
||||
}
|
||||
|
||||
const shouldLeave = await this.confirmUnsavedChanges();
|
||||
|
||||
if (shouldLeave === true) {
|
||||
this.transitionTo('settings');
|
||||
} else {
|
||||
// prevent modal from closing
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
confirmUnsavedChanges() {
|
||||
if (!this.settings.get('hasDirtyAttributes') && !this.customThemeSettings.isDirty) {
|
||||
return Promise.resolve(true);
|
||||
|
|
Loading…
Add table
Reference in a new issue