Skip to content

packageJson is never undefined #22

Closed
@ehmicky

Description

@ehmicky

The line checks for packageJson being falsy:

https://github.com/netlify/netlify-plugin-nextjs/blob/2849dc5f7c57e9fd827a939e067a871e4cb487b1/index.js#L21

However, when a site has no package.json, packageJson is an empty object. Therefore, Object.keys(packageJson).length === 0 should be used instead.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions