Fix eslint error

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2019-02-14 15:10:07 +01:00
parent b4353ce102
commit 9d0a7b3f57

View File

@@ -327,13 +327,15 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
// remove from cards
var cards = CardService.data;
for (var card in cards) {
var labelsFromCard = cards[card].labels;
if (Object.prototype.hasOwnProperty.call(cards, card)) {
var labelsFromCard = cards[card].labels;
labelsFromCard.forEach(function (labelFromCard, index) {
if (labelFromCard.id === label.id) {
cards[card].labels.splice(index, 1);
}
});
labelsFromCard.forEach(function (labelFromCard, index) {
if (labelFromCard.id === label.id) {
cards[card].labels.splice(index, 1);
}
});
}
}
};
@@ -353,13 +355,15 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
// update labels in UI
var cards = CardService.data;
for (var card in cards) {
var labelsFromCard = cards[card].labels;
if (Object.prototype.hasOwnProperty.call(cards, card)) {
var labelsFromCard = cards[card].labels;
labelsFromCard.forEach(function (labelFromCard, index) {
if (labelFromCard.id === label.id) {
cards[card].labels[index] = label;
}
});
labelsFromCard.forEach(function (labelFromCard, index) {
if (labelFromCard.id === label.id) {
cards[card].labels[index] = label;
}
});
}
}
};