mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
error out early when saving widgets
This commit is contained in:
@@ -238,12 +238,16 @@ define(['forum/admin/settings'], function(Settings) {
|
||||
}, function(err) {
|
||||
total--;
|
||||
|
||||
if (err) {
|
||||
app.alertError(err.message);
|
||||
}
|
||||
|
||||
if (total === 0) {
|
||||
app.alert({
|
||||
alert_id: 'admin:widgets',
|
||||
type: err ? 'danger' : 'success',
|
||||
title: err ? 'Error' : 'Widgets Updated',
|
||||
message: err ? err.message : 'Successfully updated widgets',
|
||||
type: 'success',
|
||||
title: 'Widgets Updated',
|
||||
message: 'Successfully updated widgets',
|
||||
timeout: 2500
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user