Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
wwelling committed Nov 21, 2020
1 parent 0a0c105 commit df52004
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions app/repo/abstractRepo.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,16 @@ core.service("AbstractRepo", function ($q, $rootScope, $timeout, ApiResponseActi
newList.push(new model(modelObj));
});

var i, j, newItem, match;

// find and extend updated entities and splice out removed entities
for (var i = 0; i < newList.length; i++) {
var newItem = newList[i];
for (i = 0; i < newList.length; i++) {
newItem = newList[i];

var match = false;
match = false;

for (var j = 0; j < list.length; j++) {
var item = list[j];
for (j = 0; j < list.length; j++) {
item = list[j];

if (item.id === newItem.id) {
angular.extend(item, newItem);
Expand All @@ -265,13 +267,13 @@ core.service("AbstractRepo", function ($q, $rootScope, $timeout, ApiResponseActi
}

// check for newly created entities and insert them
for (var i = list.length - 1; i >= 0; i--) {
var item = list[i];
for (i = list.length - 1; i >= 0; i--) {
item = list[i];

var match = false;
match = false;

for (var j = newList.length - 1; j >= 0; j--) {
var newItem = newList[j];
for (j = newList.length - 1; j >= 0; j--) {
newItem = newList[j];

if (newItem.id === item.id) {
match = true;
Expand Down

0 comments on commit df52004

Please sign in to comment.