Hide reset facet header in mobile flyout

<?php
/**
 ** hide a reset button header in mobile facet when no facets are selected
 ** auto-hide option does not yet work for mobile header
 **/

add_action( 'wp_head', function() {
    ?>
    <script>
    (function($) {
        $(document).on('facetwp-loaded', function() {
            if ('' != FWP.buildQueryString()) {
                $('.flyout-row.name-my_reset').show(); // change my_reset to name/slug of your reset facet
            } else {
                $('.flyout-row.name-m_-reset').hide(); // change my_reset to name/slug of your reset facet
            }
            });
    })(jQuery);
    </script>
    <?php
}, 100 );