default context preset cannot be deleted

This commit is contained in:
Stefan Daniel Schwarz
2023-08-26 14:52:23 +02:00
parent 7e506db105
commit 3509e6b1d4
3 changed files with 9 additions and 2 deletions

View File

@@ -399,6 +399,11 @@ jQuery(async () => {
return;
}
// default context preset cannot be deleted
if (apiId == "context" && power_user.default_context === power_user.context.preset) {
return;
}
const confirm = await callPopup('Delete the preset? This action is irreversible and your current settings will be overwritten.', 'confirm');
if (!confirm) {