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(nextjs): Add default distDir value back into index.server.ts #5479

Merged
merged 1 commit into from
Jul 28, 2022

Conversation

lobsterkatie
Copy link
Member

In #5445, a change was made to the way the global RewriteFrames helper value is handled. Specifically, setting the default value (using the || operator) was moved to the place where the value is set rather than where it's retrieved. But if something goes wrong and for whatever reason the value never gets set globally, it now causes errors when the value is later used, because it has nothing to default to.

This fixes that by restoring the default value to the old location, so that when it's used, it will never be undefined.

Fixes #5478.

@lobsterkatie lobsterkatie force-pushed the kmclb-nextjs-guard-global-distDir branch from 2a721a4 to b188c11 Compare July 28, 2022 13:51
@lobsterkatie lobsterkatie merged commit b524d8c into master Jul 28, 2022
@lobsterkatie lobsterkatie deleted the kmclb-nextjs-guard-global-distDir branch July 28, 2022 14:07
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.

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
3 participants