Fix scrutinizer issues

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2018-06-19 19:40:12 +02:00
parent 56412498f1
commit c2c0bae3d6
3 changed files with 3 additions and 16 deletions

View File

@@ -101,8 +101,8 @@ app.controller('CardController', function ($scope, $rootScope, $sce, $location,
var reg = /\[(X|\s|\_|\-)\]\s(.*)/ig;
var nth = 0;
$scope.status.edit.description = $scope.status.edit.description.replace(reg, function (match, i, original) {
var result = match;
if (nth++ === id) {
var result;
if (match.match(/^\[\s\]/i)) {
result = match.replace(/\[\s\]/i, '[x]');
}