-
Notifications
You must be signed in to change notification settings - Fork 474
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
Bad developer practice causes JS exception #2195
Comments
I have PR for this, we've had the same issue: |
We are experiencing this when doing |
@davidwessman are you using |
Right now it looks like: created() {
this.poll();
},
methods: {
poll() {
this.$inertia.reload({
onSuccess: (event) => {
if (event.component === "PollingShow") {
setTimeout(this.poll, 1000);
}
},
});
},
}, Context: This is Vue3 🙂 |
Does anyone have a clean example of producing this error? Trying to write a test that replicates the behavior and having trouble. Clean meaning: fire up a fresh Inertia app and write the simplest script possible to re-create the error. |
@ipddev @davidwessman can you both drop your EDIT: and possibly your |
Found it, i think @joetannenbaum. Seems to happen (for us) when doing a We're still using Simple repro repo below, just EDIT: i'd wager this is what's happening with @davidwessman as well as it looks like the reload they're calling is happening as soon as the component is created too - looks likely to be that inertia.reload is pushed onto the queue before the initial call to |
I'm also encountering the same problem on Vue 3 and Inertia 2.0, with Firefox 134.0. I get the error when I click on a Inertia
I'll try to create a minimum repro as soon as I have some time. |
@LucaRed do you have any or maybe one that triggers on an observer in the persistent layout? |
This was immensely helpful, thanks @danmatthews 👍 |
@davidwessman definitely open another issue if you haven't already, i'll try re-upgrading our app to 2.0 tonight and see if we get the same thing. |
Adding
href=#
to an A tag and then scrolling after clicking triggers an Exception in FireFox (v134.0) with the following error:Although its bad practice, I think it needs to be handled as it still seems quite a common unfortunately, and it took a lot of head scratching to realise what was causing the site to stop working!
Link to line:
inertia/packages/core/src/history.ts
Line 106 in 66985bf
The text was updated successfully, but these errors were encountered: