diff --git a/src/meta/configs.js b/src/meta/configs.js index bbb5b3a387..723e58083d 100644 --- a/src/meta/configs.js +++ b/src/meta/configs.js @@ -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)) { diff --git a/src/meta/settings.js b/src/meta/settings.js index 6f14a33a8a..4fba3fcb2e 100644 --- a/src/meta/settings.js +++ b/src/meta/settings.js @@ -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)) {