]> _ Git - cubist_cms-back.git/commitdiff
wip #5383
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 16 Aug 2022 16:56:28 +0000 (18:56 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 16 Aug 2022 16:56:28 +0000 (18:56 +0200)
src/public/bunchmultiple/bunchmultiple.js

index 9e26939b7d7b6d1625dc7ee2c9c7bf9438ccc1b6..d9f31525b44003d32fec635e601681a8b2f265d9 100644 (file)
                         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');