From 3cff31be4e288056baf0065ce0f3466dba07750d Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Thu, 16 May 2013 13:13:46 -0400 Subject: [PATCH] getMultipleUserFields will return empty ojbect if no uids are passed in --- src/user.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/user.js b/src/user.js index e7c8c16774..5d1f3c04d7 100644 --- a/src/user.js +++ b/src/user.js @@ -38,6 +38,11 @@ var config = require('../config.js'), // a function I feel should be built in user not sure how baris is tackling this so oppa chicken wrapper here User.getMultipleUserFields = function(uids, fields, callback) { + if(uids.length === 0) { + callback({}); + return; + } + var uuids = uids.filter(function(value, index, self) { return self.indexOf(value) === index; });