Skip to content

Commit 241a772

Browse files
committed
Code review
1 parent 70da331 commit 241a772

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dist/cache-save/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -83348,7 +83348,7 @@ function getNodeVersionFromFile(versionFilePath) {
8334883348
try {
8334983349
const manifest = JSON.parse(contents);
8335083350
// Presume package.json file.
83351-
if (typeof manifest === 'object' && manifest !== null) {
83351+
if (typeof manifest === 'object' && !!manifest) {
8335283352
// Support Volta.
8335383353
// See https://docs.volta.sh/guide/understanding#managing-your-project
8335483354
if ((_a = manifest.volta) === null || _a === void 0 ? void 0 : _a.node) {

dist/setup/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -93795,7 +93795,7 @@ function getNodeVersionFromFile(versionFilePath) {
9379593795
try {
9379693796
const manifest = JSON.parse(contents);
9379793797
// Presume package.json file.
93798-
if (typeof manifest === 'object' && manifest !== null) {
93798+
if (typeof manifest === 'object' && !!manifest) {
9379993799
// Support Volta.
9380093800
// See https://docs.volta.sh/guide/understanding#managing-your-project
9380193801
if ((_a = manifest.volta) === null || _a === void 0 ? void 0 : _a.node) {

src/util.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function getNodeVersionFromFile(versionFilePath: string): string | null {
1818
const manifest = JSON.parse(contents);
1919

2020
// Presume package.json file.
21-
if (typeof manifest === 'object' && manifest !== null) {
21+
if (typeof manifest === 'object' && !!manifest) {
2222
// Support Volta.
2323
// See https://docs.volta.sh/guide/understanding#managing-your-project
2424
if (manifest.volta?.node) {

0 commit comments

Comments
 (0)