Skip to content

Commit 4c1d5a4

Browse files
committed
fix: fix error handling for outdated node versions
1 parent ecfbc44 commit 4c1d5a4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

run-selfhosted.js

+10
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@ const early_init_errors = [
9393
}
9494
];
9595

96+
// null coalescing operator
97+
const nco = (...args) => {
98+
for ( const arg of args ) {
99+
if ( arg !== undefined && arg !== null ) {
100+
return arg;
101+
}
102+
}
103+
return undefined;
104+
}
105+
96106
const _print_error_help = (error_help) => {
97107
const lines = [];
98108
lines.push(nco(error_help.title, error_help.text));

0 commit comments

Comments
 (0)