Skip to content

Commit

Permalink
fix: fix error handling for outdated node versions
Browse files Browse the repository at this point in the history
  • Loading branch information
KernelDeimos committed Apr 29, 2024
1 parent ecfbc44 commit 4c1d5a4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions run-selfhosted.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ const early_init_errors = [
}
];

// null coalescing operator
const nco = (...args) => {
for ( const arg of args ) {
if ( arg !== undefined && arg !== null ) {
return arg;
}
}
return undefined;
}

const _print_error_help = (error_help) => {
const lines = [];
lines.push(nco(error_help.title, error_help.text));
Expand Down

0 comments on commit 4c1d5a4

Please sign in to comment.