From 9c389c1afba6bf8434c3740a88f2f96604d97468 Mon Sep 17 00:00:00 2001 From: Sahat Yalkabov Date: Fri, 6 Dec 2013 00:03:07 -0500 Subject: [PATCH] Profile data defaults to empty string to prevent value of undefined on account page --- models/User.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/models/User.js b/models/User.js index 26313a049f..b471b13a70 100644 --- a/models/User.js +++ b/models/User.js @@ -16,11 +16,11 @@ var userSchema = new mongoose.Schema({ // Optional profile information profile: { - name: String, - email: String, - location: String, - website: String, - picture: String + name: { type: String, default: '' }, + email: { type: String, default: '' }, + location: { type: String, default: '' }, + website: { type: String, default: '' }, + picture: { type: String, default: '' } }, // API access tokens