From 8cb95c4105c2062fbc243805364b9369cef91d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 3 Oct 2017 23:51:44 +0200 Subject: [PATCH] Frontend: Fix codacy errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- js/controller/CardController.js | 2 +- js/service/CardService.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/js/controller/CardController.js b/js/controller/CardController.js index 17b3461e1..080ac960d 100644 --- a/js/controller/CardController.js +++ b/js/controller/CardController.js @@ -146,7 +146,7 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo $scope.showAssignUser = function() { $scope.status.showAssignUser = true; $timeout(function() { - $("#assignUserSelect").find('a').click(); + $('#assignUserSelect').find('a').click(); }); }; diff --git a/js/service/CardService.js b/js/service/CardService.js index 92355f3ba..3938670f7 100644 --- a/js/service/CardService.js +++ b/js/service/CardService.js @@ -98,8 +98,9 @@ app.factory('CardService', function(ApiService, $http, $q){ CardService.prototype.assignUser = function (card, user) { var deferred = $q.defer(); var self = this; - if (self.getCurrent().assignedUsers === null) + if (self.getCurrent().assignedUsers === null) { self.getCurrent().assignedUsers = []; + } $http.post(this.baseUrl + '/' + card.id + '/assign', {'userId': user}).then(function (response) { self.getCurrent().assignedUsers.push(response.data); deferred.resolve(response.data);