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

fix(nuxt): don't try to override computed layouts in definePageMeta #9161

Merged
merged 7 commits into from
Jan 14, 2023

Conversation

ms-fadaei
Copy link
Contributor

@ms-fadaei ms-fadaei commented Nov 18, 2022

πŸ”— Linked issue

resolves nuxt/nuxt#15344

❓ 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

Hey
As mentioned in the linked issues, there is a bug with the computed layout when using definePageMeta.
Also, there is a workaround for that as @danielroe mentioned it.
But after a bit of research I figured out what's going on and it can be fixed with this PR.
I also changed the example to be clearer.

πŸ“ Checklist

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

@codesandbox
Copy link

codesandbox bot commented Nov 18, 2022

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@ms-fadaei
Copy link
Contributor Author

I have a question too: as the document says we can use ref for the reactive layout but it throws an error (compiler macros I think) when using just a simple ref (without computed wrapper). Do you have any idea about that?

@danielroe danielroe changed the title fix: fix computed usage in definePageMeta's layout property fix(nuxt): allow computed layouts in definePageMeta Jan 14, 2023
@danielroe danielroe changed the title fix(nuxt): allow computed layouts in definePageMeta fix(nuxt): don't try to override computed layouts in definePageMeta Jan 14, 2023
@danielroe danielroe merged commit 5b19a0d into nuxt:main Jan 14, 2023
@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe mentioned this pull request Jan 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

definePageMeta's layout property errors when computed
2 participants