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

Runtime: resets stack state #6140

Merged
merged 3 commits into from
Jun 2, 2022
Merged

Runtime: resets stack state #6140

merged 3 commits into from
Jun 2, 2022

Conversation

JohnathonKoster
Copy link
Contributor

This PR fixes statamic/ssg#98 by clearing the stack contents when the main Antlers render method is invoked.

To validate the fix, use stacks in the site's layout, and push to it from a template that is rendered multiple times. Once you run the ssg:generate command, you will find that the pushed contents are rendered multiple times on subsequent pages. In addition to validating against an SSG site, the provided test case will also fail when moving it to the base branch 👍

There exists a test case already to ensure this change does not break using stacks from partials: statamic/ssg#98

@jackmcdade jackmcdade merged commit 44de54e into statamic:3.3 Jun 2, 2022
@jackmcdade
Copy link
Member

Thanks @JohnathonKoster!

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.

Antler stacks are broken
3 participants