From cacbcaeb7e178bb09ca5e816911d9e1d424a04e0 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 19 Jul 2013 17:21:51 +1000 Subject: [PATCH] blank responses led to an undefined on the user screen --- app/assets/javascripts/discourse/models/user.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/models/user.js b/app/assets/javascripts/discourse/models/user.js index 6478f85f6..898bd881c 100644 --- a/app/assets/javascripts/discourse/models/user.js +++ b/app/assets/javascripts/discourse/models/user.js @@ -371,7 +371,9 @@ Discourse.User.reopenClass({ insertAt = index + 1; } }); - result.insertAt(insertAt, responses); + if(responses.count > 0) { + result.insertAt(insertAt, responses); + } return(result); },