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: access $store from nuxt2Context #930

Merged
merged 2 commits into from
Oct 11, 2023
Merged

Conversation

wattanx
Copy link
Collaborator

@wattanx wattanx commented Oct 10, 2023

πŸ”— Linked issue

Fixes: #928

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

vue2App is undefined in defineNuxtPlugin.
So, vue2App.$store cannot be referenced.
Because nuxt2Context.store can also be accessed by defineNuxtPlugin, it was changed so that it is accessed from there.
(Adding $store to nuxt2Context did not work.)

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@wattanx wattanx changed the title fix: add $store to nuxt2Context. fix: see store in nuxt2Context instead of vue2App Oct 11, 2023
@wattanx wattanx changed the title fix: see store in nuxt2Context instead of vue2App fix: use store in nuxt2Context instead of vue2App Oct 11, 2023
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

can we add a test for this?

@wattanx wattanx marked this pull request as draft October 11, 2023 13:36
@wattanx wattanx marked this pull request as ready for review October 11, 2023 13:45
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

❀️

@danielroe danielroe changed the title fix: use store in nuxt2Context instead of vue2App fix: access $store from nuxt2Context Oct 11, 2023
@danielroe danielroe merged commit 3bdcd6b into main Oct 11, 2023
9 checks passed
@danielroe danielroe deleted the fix/add-store-into-nuxtapp branch October 11, 2023 13:59
@github-actions github-actions bot mentioned this pull request Oct 26, 2023
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.

Cannot get $store in defineNuxtPlugin
2 participants