mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
Fixed bug in settingsv1
If the saved value was an empty string, then textareas (and more importantly, select boxes) would not be properly populated with the saved value.
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user