Use index-based for loop instead of for-in in SG
Using for-in on an empty array (from test data) was pulling in Ember properties like firstObject for some reason, which was causing a spec failure when we tried to access those objects in the array. Stop using for-in so that the test stops failing. Test plan: - Specs pass Change-Id: If9ff1b6785b4e1f113fe0195051696c404e8e75e Reviewed-on: https://gerrit.instructure.com/155648 Tested-by: Jenkins Reviewed-by: Gary Mei <gmei@instructure.com> Reviewed-by: Derek Bender <djbender@instructure.com> QA-Review: Indira Pai <ipai@instructure.com> Product-Review: Adrian Packel <apackel@instructure.com>
This commit is contained in:
parent
73bb57555f
commit
41f0e2cf84
|
@ -876,7 +876,7 @@ function initRubricStuff(){
|
|||
rubricAssessment.updateRubricAssociation($rubric, response.rubric_association);
|
||||
delete response.rubric_association;
|
||||
}
|
||||
for (var i in EG.currentStudent.rubric_assessments) {
|
||||
for (let i = 0; i < EG.currentStudent.rubric_assessments.length; i++) {
|
||||
if (response.id === EG.currentStudent.rubric_assessments[i].id) {
|
||||
$.extend(true, EG.currentStudent.rubric_assessments[i], response);
|
||||
found = true;
|
||||
|
|
Loading…
Reference in New Issue