Skip to content

Commit

Permalink
fix(nextjs): return the correct result if file is missing (#1356)
Browse files Browse the repository at this point in the history
  • Loading branch information
subzero10 authored Jun 1, 2024
1 parent 4877e9a commit 9ac2db8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nextjs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ function mergeWithExistingWebpackConfig(nextJsWebpackConfig, honeybadgerNextJsCo
}

async function injectHoneybadgerConfigToEntry(originalEntry, projectDir: string, configType: NextJsRuntime) {
const result = typeof originalEntry === 'function' ? await originalEntry() : { ...originalEntry }
const hbConfigFile = getHoneybadgerConfigFile(projectDir, configType)
if (!hbConfigFile) {
return originalEntry
return result
}

const hbConfigFileRelativePath = `./${hbConfigFile}`
const result = typeof originalEntry === 'function' ? await originalEntry() : { ...originalEntry }
if (!Object.keys(result).length) {
log('debug', `no entry points for configType[${configType}]`)
}
Expand Down

0 comments on commit 9ac2db8

Please sign in to comment.