Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): prefer nuxt app context over getCurrentInstance #5456

Merged
merged 1 commit into from Jun 15, 2022

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves nuxt/nuxt#14112

❓ 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

This is a workaround for vuejs/core#6110 - by preferring the unctx version of Nuxt rather than the vm. We can't trust getCurrentInstance to return null when called within Nuxt plugins, nor is there an exposed way to unset the instance.

πŸ“ Checklist

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

@danielroe danielroe added bug Something isn't working ❗ p4-important Priority 4: bugs that violate documented behavior, or significantly impact perf labels Jun 14, 2022
@danielroe danielroe requested a review from pi0 June 14, 2022 09:35
@danielroe danielroe self-assigned this Jun 14, 2022
@netlify
Copy link

netlify bot commented Jun 14, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit ee03e0d
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62a856592a76840008790e75

@pi0 pi0 merged commit d7d97cd into main Jun 15, 2022
@pi0 pi0 deleted the fix/nuxt-app-instance branch June 15, 2022 12:00
@pi0 pi0 mentioned this pull request Jul 11, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x bug Something isn't working ❗ p4-important Priority 4: bugs that violate documented behavior, or significantly impact perf
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Headers remain the same
2 participants