Sidebar Dropdowns dont always work on load

Hey all, wondered if anyone else has come across this issue.
Sometimes on page load the Sidebar nav dropdowns don’t work, no errors are displayed but nothing happens when clicking on them.
It seems like it could be the order I’m loading my scripts as on refresh if the dropdowns don’t work they wont work at all until refreshing the page, and likewise when it does work it will work until refreshing the page.
I’m using .net Core/ Blazor.
js scripts load order:

Thanks for any help, loving the theme so far great work with it

Example of my sidebar code here:

To update: this is caused by signal r, whenever the /signalr/hubs js file is loaded the nav drop downs are intermittent, removing the reference to the file fixes the issue. I havnt found a solution to get the dropdowns working with signal r yet