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: don't mutate the original env object #37

Merged
merged 3 commits into from
Sep 18, 2023
Merged

fix: don't mutate the original env object #37

merged 3 commits into from
Sep 18, 2023

Conversation

brc-dd
Copy link
Contributor

@brc-dd brc-dd commented Sep 17, 2023

Things like env.title were being overwritten because the original object was being passed. Using structuredClone would prevent using this on StackBlitz temporarily. We can just spread env if you want to keep this running on v16. It won't be the safest solution, but would work better than passing the original one.

@changeset-bot
Copy link

changeset-bot bot commented Sep 17, 2023

🦋 Changeset detected

Latest commit: e6073ee

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

This PR includes changesets to release 2 packages
Name Type
vitepress-plugin-npm-commands Patch
vitepress-plugin-detype Patch

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

@sapphi-red sapphi-red changed the title fix!: don't mutate the original env object fix: don't mutate the original env object Sep 18, 2023
Copy link
Owner

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

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

Thanks! I didn't notice this was the reason.
I replaced structuredClone with klona so that it works with stackblitz.

@sapphi-red sapphi-red merged commit 51168e0 into sapphi-red:main Sep 18, 2023
6 checks passed
@github-actions github-actions bot mentioned this pull request Sep 18, 2023
@brc-dd brc-dd deleted the env-loss branch September 18, 2023 07:16
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