Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/code save failed popup #555

Merged
merged 4 commits into from
Nov 21, 2023
Merged

Conversation

VladimirBeria
Copy link
Contributor

No description provided.

Comment on lines 131 to 145
async saveCode() {
if (this.disabledSave) return;
try {
if (this.id) {
await this.updateItem();
} else {
await this.addItem();
await this.redirectToEdit();
}
this.isSaveFailedPopup = false;
} catch (err) {
this.isSaveFailedPopup = true;
throw err;
}
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я так розумію, це код скопійований з міксина сейва
це не можна якось розумніше зробити, ніж просто здублювати логіку?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Змінив на

async saveCode() {
      try {
        await this.save();
        this.isSaveFailedPopup = false;
      } catch (err) {
        this.isSaveFailedPopup = true;
        throw err;
      }
    },

@dlohvinov dlohvinov merged commit 7e8a721 into master Nov 21, 2023
1 check passed
@dlohvinov dlohvinov deleted the feature/code-save-failed-popup branch November 21, 2023 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants