Fix issues

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2017-11-11 12:53:11 +01:00
committed by Julius Härtl
parent afec4f211c
commit abc039a634
8 changed files with 22 additions and 13 deletions

View File

@@ -103,7 +103,7 @@ app.factory('StackService', function (ApiService, $http, $q) {
var self = this;
var cards = this.data[entity.stackId].cards;
for (var i = 0; i < cards.length; i++) {
if (cards[i].id == entity.id) {
if (cards[i].id === entity.id) {
cards[i] = entity;
}
}
@@ -112,13 +112,13 @@ app.factory('StackService', function (ApiService, $http, $q) {
var self = this;
var cards = this.data[entity.stackId].cards;
for (var i = 0; i < cards.length; i++) {
if (cards[i].id == entity.id) {
if (cards[i].id === entity.id) {
cards.splice(i, 1);
}
}
};
service = new StackService($http, 'stacks', $q);
var service = new StackService($http, 'stacks', $q);
return service;
});