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

fix: no deletion of scripts during view transition #8636

Merged
merged 1 commit into from
Sep 22, 2023
Merged

fix: no deletion of scripts during view transition #8636

merged 1 commit into from
Sep 22, 2023

Conversation

martrapp
Copy link
Member

Changes

there were some problems with the deletion of scripts during view transition (to prevent re-execution)
No they are not deleted anymore but simply marked as already executed

Testing

pass existing e2e tests

Docs

bug fix, n/a

@changeset-bot
Copy link

changeset-bot bot commented Sep 22, 2023

🦋 Changeset detected

Latest commit: 50b7f57

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Sep 22, 2023
} else {
s1.remove();
// the old script is in the new document: we mark it as executed to prevent re-execution
s2.dataset.astroExec = '';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very clever, this also means they will exist on the next page transition, so they won't be removed there either.

@martrapp martrapp marked this pull request as draft September 22, 2023 14:08
@martrapp martrapp marked this pull request as ready for review September 22, 2023 15:15
@matthewp matthewp merged commit 974d511 into withastro:main Sep 22, 2023
@astrobot-houston astrobot-houston mentioned this pull request Sep 22, 2023
@martrapp martrapp deleted the remove_scripts branch September 22, 2023 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants