File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ interface CheckResult {
99/** Check if Node.js version is >= 20 */
1010async function checkNodeVersion ( ) : Promise < CheckResult > {
1111 const version = process . version ;
12- const majorVersion = parseInt ( version . slice ( 1 ) . split ( '.' ) [ 0 ] , 10 ) ;
12+ const majorVersion = parseInt ( version . slice ( 1 ) . split ( '.' ) [ 0 ] || '0' , 10 ) ;
1313
1414 if ( majorVersion >= 20 ) {
1515 return {
@@ -190,7 +190,7 @@ export async function runDoctor(autoFix: boolean = false): Promise<void> {
190190 console . log ( '⚠️ Some requirements are not satisfied.\n' ) ;
191191
192192 // Check if Node.js version failed
193- if ( ! results [ 0 ] . passed ) {
193+ if ( ! nodeResult . passed ) {
194194 console . log ( '📌 Node.js must be manually installed or updated.' ) ;
195195 console . log ( ' Download from: https://nodejs.org/ (LTS version recommended)\n' ) ;
196196 }
You can’t perform that action at this time.
0 commit comments