Node.js based forum software built for the modern web
guard against crashes if set is null or not passed in
Julian Lam341a8d504620
diff --git a/src/user/blocks.js b/src/user/blocks.jsindex 44bfbac3ce..5834fdd0b4 100644--- a/src/user/blocks.js+++ b/src/user/blocks.js@@ -76,7 +76,7 @@ module.exports = function (User) {property = 'uid';}- if (!Array.isArray(set) || !set.length || !(set[0].hasOwnProperty(property) || typeof set[0] === 'number' || typeof set[0] === 'string')) {+ if (!set || !Array.isArray(set) || !set.length || !(set[0].hasOwnProperty(property) || typeof set[0] === 'number' || typeof set[0] === 'string')) {return callback(null, set);}