When you look at the console when triggering the mouse leave event for the subnav bar, you see errors. This is because subNav can be null (for nav bar items that have no subnav bar). We just need to add a check that the subNav bar exists before adding/removing styles.
What happened?
When you look at the console when triggering the mouse leave event for the subnav bar, you see errors. This is because subNav can be null (for nav bar items that have no subnav bar). We just need to add a check that the subNav bar exists before adding/removing styles.