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): Reverse order of checks for instrumenting server #5828

Merged
merged 1 commit into from Sep 27, 2022

Conversation

lobsterkatie
Copy link
Member

@lobsterkatie lobsterkatie commented Sep 27, 2022

As it stands right now, when we check whether or not to require instrumentServer, our check short-circuits if the code is running on vercel. This is a problem, because the first run of isBuild() causes a side effect (it sets an env var) which then enables all future runs, so without that initial run, future runs fail. This reverses the order of the check, so that isBuild() will always run.

@lobsterkatie lobsterkatie merged commit 0cfda74 into master Sep 27, 2022
@lobsterkatie lobsterkatie deleted the kmclb-nextjs-make-isBuild-run-on-vercel branch September 27, 2022 07:59
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.

None yet

2 participants