Unverified Commit a3b9d867 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Remove extra check in config loading (#17336)

Noticed while adding config checks for a new config that the `basePath` checks were wrapped in a `result.experimental` check and even though this should always be true from the default experimental value being an object the `basePath` checks shouldn't be wrapped in this check since it isn't experimental anymore. 
parent 92fc260e
...@@ -169,7 +169,7 @@ function assignDefaults(userConfig: { [key: string]: any }) { ...@@ -169,7 +169,7 @@ function assignDefaults(userConfig: { [key: string]: any }) {
`Specified assetPrefix is not a string, found type "${typeof result.assetPrefix}" https://err.sh/vercel/next.js/invalid-assetprefix` `Specified assetPrefix is not a string, found type "${typeof result.assetPrefix}" https://err.sh/vercel/next.js/invalid-assetprefix`
) )
} }
if (result.experimental) {
if (typeof result.basePath !== 'string') { if (typeof result.basePath !== 'string') {
throw new Error( throw new Error(
`Specified basePath is not a string, found type "${typeof result.basePath}"` `Specified basePath is not a string, found type "${typeof result.basePath}"`
...@@ -205,7 +205,7 @@ function assignDefaults(userConfig: { [key: string]: any }) { ...@@ -205,7 +205,7 @@ function assignDefaults(userConfig: { [key: string]: any }) {
} }
} }
} }
}
return result return result
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment