Force reload on pager

<?php

/** reloads window instead of using ajax
 ** for facet pager clicks
 **/
add_action( 'wp_head', function() {
?>
<script>
document.addEventListener('facetwp-refresh', function() {
    if ( FWP.loaded && null !== FWP.active_facet ) {
          let facet = FWP.active_facet;
          let facet_type = facet.attr('data-type');
          if ( 'pager' == facet_type ) {
                FWP.setHash();
                window.location.reload();
            }
        }
});
</script>
<?php
}, 100 );