From b70a38f48585d258523e20ae89a34a6149b09f16 Mon Sep 17 00:00:00 2001 From: Eric Kelly Date: Fri, 30 Aug 2013 00:43:54 -0400 Subject: [PATCH] FIX: Index out of range error Fixes 'index out of range error' that occurs when viewing a user's profile page when they haven't yet posted a reply or created a topic and is @mentioned in a topic. --- app/assets/javascripts/discourse/models/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/models/user.js b/app/assets/javascripts/discourse/models/user.js index c367dd875..816007184 100644 --- a/app/assets/javascripts/discourse/models/user.js +++ b/app/assets/javascripts/discourse/models/user.js @@ -345,7 +345,7 @@ Discourse.User.reopenClass(Discourse.Singleton, { var result = Em.A(); result.pushObjects(stats.rejectProperty('isResponse')); - var insertAt = 1; + var insertAt = 0; result.forEach(function(item, index){ if(item.action_type === Discourse.UserAction.TYPES.topics || item.action_type === Discourse.UserAction.TYPES.posts){ insertAt = index + 1;