From d87fa93af3860f476ec1be1199a1f17098ebafb5 Mon Sep 17 00:00:00 2001 From: "Anantachai Saothong (Manta)" Date: Thu, 28 Dec 2023 15:02:08 +0700 Subject: [PATCH] Code review --- src/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.ts b/src/util.ts index c02524e3..cc6ac310 100644 --- a/src/util.ts +++ b/src/util.ts @@ -18,7 +18,7 @@ export function getNodeVersionFromFile(versionFilePath: string): string | null { const manifest = JSON.parse(contents); // Presume package.json file. - if (typeof manifest === 'object' && manifest !== null) { + if (typeof manifest === 'object' && !!manifest) { // Support Volta. // See https://docs.volta.sh/guide/understanding#managing-your-project if (manifest.volta?.node) {