New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught Error: History.js Adapter has already been loaded... #189
Comments
+1 |
+1! |
+1 |
+1 Anyone got a solution to this? |
+1 How can i fix it? |
+1 |
4 similar comments
+1 |
+1 |
+1 |
+1 |
well you can do this
|
Fixed in my fork, get it here: |
Fixed in unstable DEV branch now! |
+100 |
Still doesn't work in master, makes Router.js unuseable. |
+100 |
+1 |
Also causes igor-alexandrov/wiselinks#59 |
+1 causing me a big headache - can't find a solution for this on google. |
+1 |
4 similar comments
+1 |
+1 |
+1 |
+1 |
seems to happen to me too |
I can't see why this issue is closed ! |
+1 |
2 similar comments
+1 |
+1 |
Unfortunately you're not able to catch this error since it's being thrown within the anonymous function that it's defined within. Here's a workaround - simply unload History.js prior to loading it to ensure that it is able to setup. This has some side effects if you're planning on storing History between page reloads. <script type="text/javascript">
delete History
</script>
<script src="http://www.yourwebsite.com/history.js/scripts/bundled/html4+html5/jquery.history.js"></script> |
+1 Wonder why there is yet no fix by the dev(s). Why not simply substituting the anon function by ref to a regular function? It's that easy! |
+1 I'm gonna go with jclays proposed unload workaround, but it feels a bit stupid to unload everything when it obviously is a bug that should be fixed in this package instead. It is a 4 years old bug now? :-O |
Hey Devs!
Very nice plugin/library! Is there a way to get rid of the "Uncaught Error: History.js Adapter has already been loaded... ". I tried with try/catch, but that doesn't work.
I'm using http://labjs.com/ and unfortunately I can't control/check right now if a script was loaded before, so double loading can happen and then historyjs breaks the application with this uncaught error.
Thanks in advance,
Matthias
The text was updated successfully, but these errors were encountered: