document.addEventListener('DOMContentLoaded', function() {
  const ERROR = document.querySelector('.js-error');
  if (ERROR) {
    const TAB = ERROR.closest('[data-tab]').dataset.tab;
    document.querySelector(`[data-tab-control=${TAB}]`).click();
  }
});
