Skip to content

Commit

Permalink
Only output the exerimental features warning if the user actual
Browse files Browse the repository at this point in the history
ly opted into at least one experiment.

Signed-off-by: Sophia Willows <20146550+sophiabits@users.noreply.github.com>
  • Loading branch information
sophiabits committed Feb 16, 2022
1 parent b093138 commit 0c5d91d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/next/server/config.ts
Expand Up @@ -65,7 +65,12 @@ function assignDefaults(userConfig: { [key: string]: any }) {
return currentConfig
}

if (key === 'experimental' && value !== defaultConfig[key]) {
if (
key === 'experimental' &&
value !== defaultConfig[key] &&
typeof value === 'object' &&
Object.keys(value).length > 0
) {
experimentalWarning()
}

Expand Down

0 comments on commit 0c5d91d

Please sign in to comment.