From 8c342862e701763f63a2761b274ca025eb4c670e Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 4 Mar 2020 12:17:12 +0100 Subject: [PATCH] Fix removing a board in kanban --- www/kanban/jkanban.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/kanban/jkanban.js b/www/kanban/jkanban.js index f5bd9939c..ca866dcfd 100644 --- a/www/kanban/jkanban.js +++ b/www/kanban/jkanban.js @@ -452,7 +452,7 @@ this.setBoards = function (boards) { //self.element for (var i in this.options.boards.list) { - var boardkey = boards.list[i]; + var boardkey = this.options.boards.list[i]; this.removeBoard(boardkey); } this.options.boards = boards; @@ -495,6 +495,8 @@ if (typeof (board) === 'string' || typeof (board) === "number") { id = board; board = self.element.querySelector('[data-id="' + board + '"]'); + } else if (board) { + id = board.id; } if (board) { board.remove(); @@ -504,7 +506,7 @@ } // Remove duplicates - if (id) { $('.kanban-board[data-id="' + board + '"]').remove(); } + if (id) { $(self.element).find('.kanban-board[data-id="' + board + '"]').remove(); } return self; }