Fix for issue 1099.

Signed-off-by: zane <zane.mccaig@mail.mcgill.ca>
This commit is contained in:
zane 2015-02-18 11:05:53 -04:00
parent ea35a2f48d
commit 39560b9ce6
1 changed files with 5 additions and 2 deletions

View File

@ -104,8 +104,11 @@ module.exports = function(Role) {
});
function isUserClass(modelClass) {
return modelClass === loopback.User ||
modelClass.prototype instanceof loopback.User;
if (modelClass) {
return modelClass === loopback.User ||
modelClass.prototype instanceof loopback.User;
}
else return false;
}
/*!