mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
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.
This commit is contained in:
parent
380a6c9e9d
commit
b70a38f485
1 changed files with 1 additions and 1 deletions
|
@ -345,7 +345,7 @@ Discourse.User.reopenClass(Discourse.Singleton, {
|
||||||
var result = Em.A();
|
var result = Em.A();
|
||||||
result.pushObjects(stats.rejectProperty('isResponse'));
|
result.pushObjects(stats.rejectProperty('isResponse'));
|
||||||
|
|
||||||
var insertAt = 1;
|
var insertAt = 0;
|
||||||
result.forEach(function(item, index){
|
result.forEach(function(item, index){
|
||||||
if(item.action_type === Discourse.UserAction.TYPES.topics || item.action_type === Discourse.UserAction.TYPES.posts){
|
if(item.action_type === Discourse.UserAction.TYPES.topics || item.action_type === Discourse.UserAction.TYPES.posts){
|
||||||
insertAt = index + 1;
|
insertAt = index + 1;
|
||||||
|
|
Loading…
Reference in a new issue