mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 07:25: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) {
|
}, function(err) {
|
||||||
total--;
|
total--;
|
||||||
|
|
||||||
|
if (err) {
|
||||||
|
app.alertError(err.message);
|
||||||
|
}
|
||||||
|
|
||||||
if (total === 0) {
|
if (total === 0) {
|
||||||
app.alert({
|
app.alert({
|
||||||
alert_id: 'admin:widgets',
|
alert_id: 'admin:widgets',
|
||||||
type: err ? 'danger' : 'success',
|
type: 'success',
|
||||||
title: err ? 'Error' : 'Widgets Updated',
|
title: 'Widgets Updated',
|
||||||
message: err ? err.message : 'Successfully updated widgets',
|
message: 'Successfully updated widgets',
|
||||||
timeout: 2500
|
timeout: 2500
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user