mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-05 03:51:26 +01:00
settings.get should return empty obj instead of null
This commit is contained in:
@@ -411,7 +411,13 @@ var fs = require('fs'),
|
||||
Meta.settings = {};
|
||||
Meta.settings.get = function(hash, callback) {
|
||||
hash = 'settings:' + hash;
|
||||
db.getObject(hash, callback);
|
||||
db.getObject(hash, function(err, settings) {
|
||||
if (err) {
|
||||
callback(err);
|
||||
} else {
|
||||
callback(null, settings || {});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Meta.settings.getOne = function(hash, field, callback) {
|
||||
|
||||
Reference in New Issue
Block a user