- if (!options || Utils.isEmptyObject(options)) {
- options = {
- readonly: false,
- visible: true,
- reboot: false,
- };
- }
- const readonly = options.readonly ?? false;
- const visible = options.visible ?? true;
- const reboot = options.reboot ?? false;
+ options = options ?? ({} as { readonly?: boolean; visible?: boolean; reboot?: boolean });
+ options.readonly = options?.readonly ?? false;
+ options.visible = options?.visible ?? true;
+ options.reboot = options?.reboot ?? false;