how to handle " The select2('destroy') method was called on an element that is not using Select2"

Use a simple check for select2 like this:

if ($('select').data('select2')) {
   $('select').select2('destroy');
 }

I found the code in a GitHub Issue https://github.com/aldeed/meteor-autoform-select2/issues/44


From the official documentation: https://select2.org/programmatic-control/methods#checking-if-the-plugin-is-initialized

You can check if your select has the class '.select2-hidden-accessible'.

$("select.select2-hidden-accessible").select2('destroy');