mirror of
https://github.com/unraid/api.git
synced 2026-05-25 11:39:52 -05:00
fix: crashReporting crashing when false
This commit is contained in:
@@ -17,6 +17,6 @@ export default async (_: unknown, __: unknown, context: Context) => {
|
||||
|
||||
// Check if crash reporting is enabled
|
||||
const configPath = paths.get('myservers-config')!;
|
||||
const file = loadState<{ remote: { sendCrashInfo: string } }>(configPath);
|
||||
return (file.remote.sendCrashInfo ?? 'no').trim() === 'yes';
|
||||
const file = loadState<Partial<{ remote: { sendCrashInfo?: string } }>>(configPath);
|
||||
return (file?.remote?.sendCrashInfo ?? 'no').trim() === 'yes';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user