Skip to content

Node.js based forum software built for the modern web

error out early when saving widgets

psychobunnyc5cae312d7ef
diff --git a/public/src/forum/admin/themes.js b/public/src/forum/admin/themes.js
index 9866e6ec82..acfb6f3e6e 100644
--- a/public/src/forum/admin/themes.js
+++ b/public/src/forum/admin/themes.js
@@ -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
});
}