mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-24 16:29:51 +01:00
handle the case where the object is not set at all #5018
This commit is contained in:
@@ -123,6 +123,7 @@ module.exports = function(Meta) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
data = data || {};
|
||||
var empty = {};
|
||||
Object.keys(values).forEach(function(key) {
|
||||
if (!data.hasOwnProperty(key)) {
|
||||
|
||||
@@ -43,6 +43,7 @@ module.exports = function(Meta) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
settings = settings || {};
|
||||
var empty = {};
|
||||
Object.keys(values).forEach(function(key) {
|
||||
if (!settings.hasOwnProperty(key)) {
|
||||
|
||||
Reference in New Issue
Block a user