Skip to content

Node.js based forum software built for the modern web

Fixed bug in settingsv1

Julian Lamea6d2c35f7e4
diff --git a/public/src/admin/settings.js b/public/src/admin/settings.js
index c4b880f761..acfa654556 100644
--- a/public/src/admin/settings.js
+++ b/public/src/admin/settings.js
@@ -53,11 +53,11 @@ define('admin/settings', ['uploader', 'sounds'], function(uploader, sounds) {
}
}
} else if (field.is('textarea')) {
- if (app.config[key]) {
+ if (app.config.hasOwnProperty(key)) {
field.val(app.config[key]);
}
} else if (field.is('select')) {
- if (app.config[key]) {
+ if (app.config.hasOwnProperty(key)) {
field.val(app.config[key]);
}
}
diff --git a/src/controllers/index.js b/src/controllers/index.js
index a1e9c63dae..d5d26ec34e 100644
--- a/src/controllers/index.js
+++ b/src/controllers/index.js
@@ -31,6 +31,7 @@ var Controllers = {
Controllers.home = function(req, res, next) {
var route = meta.config.homePageRoute || (meta.config.homePageCustom || '').replace(/^\/+/, '') || 'categories';
+ console.log(route, meta.config);
user.getSettings(req.uid, function(err, settings) {
if (err) {