When in a category, default to "none" rather than "all" subcategories

Hi

I am having some issues with this… I added the js to my head section but apparently it breaks if you click on the logo to get back to the home page.

Step to reproduce:

  • go to the discourse website
  • select a category with subcategories -> it works, defaults to “none”
  • click on the discourse logo (upper left) and go back to the home
  • select a category with subcategories -> it doesn’t works, defaults to “all”

Any idea why ?