Strange error when pressing backspace (previous page) #601
-
Hello, i've got some pages that I have enabled up-follow for them; when I click the page links it works fine but when I press bacspace to return to the previous page I get the following error:
and unpoly stops working (until I do a full refresh). I searched google but didn't find anything on this error. Any idea / tip what could be causing this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
My guess is that your Use one of the following methods to address this:
|
Beta Was this translation helpful? Give feedback.
-
Hello @triskweline you are right! The problem was that I had put my scripts at the end of the ... It is a little difficult to move them so I used the |
Beta Was this translation helpful? Give feedback.
My guess is that your
<script>
elements live inside the<body>
. Going back replaces the<body>
by default. This causes your scripts to be run a second time.Use one of the following methods to address this:
<head>
and use<script defer>
up.history.config.restoreTargets
to a selector that does not include your scripts, e.g. a<main>
element.up.fragment.config.runScripts = false