Closed ryanrhee closed 4 years ago
read-pkg-up's sync() can return undefined. If that happens, we try to index into .packageJson, which fails.
read-pkg-up
sync()
.packageJson
Making the index operation null-safe makes execution continue on with pkg being set to an empty object, which is what seems to be the original intent.
pkg
You cannot use this syntax. It's not supported in all the supported Node.js versions.
read-pkg-up
'ssync()
can return undefined. If that happens, we try to index into.packageJson
, which fails.Making the index operation null-safe makes execution continue on with
pkg
being set to an empty object, which is what seems to be the original intent.