From: Vincent Vanwaelscappel Date: Tue, 16 Aug 2022 16:56:28 +0000 (+0200) Subject: wip #5383 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=d33e3f856d9166e102fc9971f11f4ac12a13a084;p=cubist_cms-back.git wip #5383 --- diff --git a/src/public/bunchmultiple/bunchmultiple.js b/src/public/bunchmultiple/bunchmultiple.js index 9e26939..d9f3152 100644 --- a/src/public/bunchmultiple/bunchmultiple.js +++ b/src/public/bunchmultiple/bunchmultiple.js @@ -305,7 +305,7 @@ cb.prop('checked', v === true || v === '1' || v === 1); } else if ($(input).is('.select2_from_array')) { try { - if ($(input).data('ajax') !== null && $(input).find('option[value="' + k + '"]').length === 0) { + if ($(input).is('[data-ajax]') && $(input).find('option[value="' + k + '"]').length === 0) { var options = $(input).data('options'); var newOption = new Option(options[v], v, false, false); $(input).append(newOption).trigger('change');