Fixed empty filter box due to window.location.search split having an array with 1 index