We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Astro v5.1.1 Node v22.12.0 System macOS (arm64) Package Manager npm Output static Adapter @astrojs/node
No response
This line sets the "data" value directly to be the passed in value, so if it's an object it's pass by reference:
astro/packages/astro/src/core/session.ts
Line 163 in a6a4a66
Thus if you do something like
const allData = {secret: "word", notSecret: "stuff"} Astro.session.set("allData", allData); delete allData.secret return allData;
The deferred saving of the session data causes the updates after the call to .set() to be persisted to the session store.
.set()
When Astro does this check:
Line 143 in a6a4a66
It should do the full serialization (including the URL conversion) and save that to #data.value, instead of doing it later:
#data.value
Line 224 in a6a4a66
https://stackblitz.com/edit/github-muwk6ati-e1czmh2l?file=src%2Fpages%2Findex.astro
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
This line sets the "data" value directly to be the passed in value, so if it's an object it's pass by reference:
astro/packages/astro/src/core/session.ts
Line 163 in a6a4a66
Thus if you do something like
The deferred saving of the session data causes the updates after the call to
.set()
to be persisted to the session store.What's the expected result?
When Astro does this check:
astro/packages/astro/src/core/session.ts
Line 143 in a6a4a66
It should do the full serialization (including the URL conversion) and save that to
#data.value
, instead of doing it later:astro/packages/astro/src/core/session.ts
Line 224 in a6a4a66
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-muwk6ati-e1czmh2l?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: