mirror of
https://github.com/HeyPuter/puter.git
synced 2025-02-02 23:28:39 +08:00
fix: fix error handling for outdated node versions
This commit is contained in:
parent
ecfbc44a20
commit
4c1d5a4b6d
@ -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 _print_error_help = (error_help) => {
|
||||||
const lines = [];
|
const lines = [];
|
||||||
lines.push(nco(error_help.title, error_help.text));
|
lines.push(nco(error_help.title, error_help.text));
|
||||||
|
Loading…
Reference in New Issue
Block a user