From 30b98495ec89a3603b01fdeb8b8c4b7c95b6a9d9 Mon Sep 17 00:00:00 2001 From: Kazuki Sawada Date: Mon, 9 Jan 2017 19:01:12 +0900 Subject: [PATCH] Fix: Issues cannot be created with labels Signed-off-by: Kazuki Sawada --- public/js/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/js/index.js b/public/js/index.js index 590fafa8d8bd5..559f2665d27dd 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -123,10 +123,10 @@ function initCommentForm() { } } - var labelIds = ""; + var labelIds = []; $(this).parent().find('.item').each(function () { if ($(this).hasClass('checked')) { - labelIds += $(this).data('id') + ","; + labelIds.push($(this).data('id')); $($(this).data('id-selector')).removeClass('hide'); } else { $($(this).data('id-selector')).addClass('hide'); @@ -137,7 +137,7 @@ function initCommentForm() { } else { $noSelect.addClass('hide'); } - $($(this).parent().data('id')).val(labelIds); + $($(this).parent().data('id')).val(labelIds.join(",")); return false; }); $labelMenu.find('.no-select.item').click(function () {