Skip to content
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

Add next() call to Promise resolutions #213

Closed
wants to merge 1 commit into from

Conversation

ffxsam
Copy link

@ffxsam ffxsam commented Aug 6, 2020

This is a super weird one I encountered while building my app. I noticed when I was logging out and being redirected from /tracks to /login, the Tracks view's created() lifecycle hook was being called as I was leaving the page. After adding the next() calls as in this PR, it fixed the issue.

My only guess is that the next() didn't happen quickly enough and that somehow resulted in the view's created() lifecycle hook being called, though I'm not really clear on why. Adding the next() call worked. And I figured, looking at line 92 (next(...args) before the reject() call), it made sense to call next() before the resolve() calls as well.

This is a super weird one I encountered while building my app. I noticed when I was logging out and being redirected from `/tracks` to `/login`, the `Tracks` view's `created()` lifecycle hook was being called as I was leaving the page. After adding the `next()` calls as in this PR, it fixed the issue.

My only guess is that the `next()` didn't happen quickly enough and that somehow resulted in the view's `created()` lifecycle hook being called, though I'm not really clear on why. Adding the `next()` call worked. And I figured, looking at line 92 (`next(...args)` before the `reject()` call), it made sense to call `next()` before the `resolve()` calls as well.
Base automatically changed from master to main February 28, 2021 22:24
@bencodezen
Copy link
Owner

Appreciate the PR @ffxsam! Sorry fro the delay in getting to this, I let the project lapse and currently in the process of trying to bring everything up to date.

Since this is a PR for the Vue 2 version of the boilerplate, I'm going to close this so we can focus on the Vue 3 boilerplate going forward. Hope all is well!

@bencodezen bencodezen closed this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants