AJAX callback: error with firefox I've a custom callback with a form which works well in last chrome and last FF.

$form['foo']['bar'] = array(
  '#type' =&gt; 'submit',
  '#value' =&gt; t(''),
  '#attributes' =&gt; ['class' =&gt; array('search-api glyphicon glyphicon-refresh btn-primary')],
  '#ajax' =&gt; [
    'callback' =&gt; '::fetchApiData',
    'event' =&gt; 'click',
    'effect' =&gt; 'none',
    'progress' =&gt; [
      'type' =&gt; 'throbber',
      'message' =&gt; NULL,
    ],
  ],
);


However, my customer has a old version of firefox, the esr 45.9.0 version, and when we click on the button that trigger the callback, we have an alert error.


  An error occurred while attempting to process
  /declaration?ajax_form=1&amp;_wrapper_format=drupal_ajax: invalid regular
  expression flag a


Does anybody know how to debug this?
This issue is related to drupal/boostrap theme. It doesn't occur with default drupal theme.
Replace methods in Attributes.cleanClass pass the identifier as a 3rd parameter isn't needed because string replacements in JS are chained.
https://www.drupal.org/project/bootstrap/issues/2969106