next.js
6b6782bc - [dynamicIO] Do not skip dynamic validation when metadata is dynamic (#78574)

Commit
267 days ago
[dynamicIO] Do not skip dynamic validation when metadata is dynamic (#78574) Metadata can be dynamic without that being an error. A bug was introduced in a recent refactor where the presence of dynamic metadata was incorrectly interpreted as a sign that the metadata did not have a Suspense boundary around it. This would be a problem because metadata is now streaming however it was actually a misuse of the tracking flag and would incorrectly error if you had dynamic metadata at all. This fix addresses the incorrect invariant by removing it. there is arguably a second bug here in that InvariantError causes the validation of the page to be skipped but it doesn't error the build. That is concerning but not the focus of this change. regardless by removing the incorrect invariant error code the validation begins to work again as expected.
Author
Parents
Loading