fix: add missing optional chaining operator #120
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add missing
?.
optional chaining operator inexport async function generateMetadata
inrecipes/next/app/[...puckPath]/page.tsx
.Error:
Why this happens:
By default the browser attempts to load the
http://localhost:3000/favicon.ico
file but because this file does not exist as a static file,next.js
server attempts to handle the request using/app/[...puckPath]/page.tsx
route and becausefavicon.ico
path is not defined in/database.json
this error occurs.Steps to reproduce:
Option 1.
Clone this repo
Start dev
Option 2.
Create new project using
next
recipenpx create-puck-app my-app cd my-app
Start dev
Open puck editor
Commit that introduced this error
34f248c#diff-03f6d84aea18b78020e4edaabac75a948a5c6b56b5212194570e0364684f3f41R31
Environment