diff --git a/package.json b/package.json index 656e851..3da5662 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bithive", - "version": "0.1.1", + "version": "0.1.2", "private": true, "author": { "name": "MrV", diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 91c8fc2..5c6c00a 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "BitHive", - "version": "0.1.1" + "version": "0.1.2" }, "tauri": { "allowlist": { diff --git a/src/lib/asicDefaults.ts b/src/lib/asicDefaults.ts index e5cf221..0586eef 100644 --- a/src/lib/asicDefaults.ts +++ b/src/lib/asicDefaults.ts @@ -95,13 +95,15 @@ export const coreVoltageOptions: Record = { }; export function getDefaultFrequency(model: string): number { - const options = frequencyOptions[model]; + const options = frequencyOptions[model] as DropdownOption[] | undefined; + if (!options) return 0; const defaultOption = options.find(option => option.name.includes('default')); - return defaultOption ? defaultOption.value : options[0]?.value || 0; + return defaultOption ? defaultOption.value : options[0]?.value ?? 0; } export function getDefaultCoreVoltage(model: string): number { - const options = coreVoltageOptions[model]; + const options = coreVoltageOptions[model] as DropdownOption[] | undefined; + if (!options) return 0; const defaultOption = options.find(option => option.name.includes('default')); - return defaultOption ? defaultOption.value : options[0]?.value || 0; + return defaultOption ? defaultOption.value : options[0]?.value ?? 0; }