mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Merge pull request #1402 from LaunchAcademy/fix_index_out_of_range_error
FIX: Index out of range error
This commit is contained in:
commit
b62caf80fb
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