fix(launcher): guard hash_prefix_length select on native_device existence
native_device can be undefined during initial load (before device config
is fetched). The select bind:value was doing a hard property access that
threw a TypeError crash when native_device was null/undefined. Wrapped
in {#if $ae_loc.native_device} to defer rendering until it's available.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -131,6 +131,7 @@
|
|||||||
>
|
>
|
||||||
<div class="flex items-center justify-between px-1">
|
<div class="flex items-center justify-between px-1">
|
||||||
<span class="text-[9px]">Hash Prefix Length</span>
|
<span class="text-[9px]">Hash Prefix Length</span>
|
||||||
|
{#if $ae_loc.native_device}
|
||||||
<select
|
<select
|
||||||
bind:value={
|
bind:value={
|
||||||
$ae_loc.native_device.hash_prefix_length
|
$ae_loc.native_device.hash_prefix_length
|
||||||
@@ -141,6 +142,9 @@
|
|||||||
<option value={2}>2 chars</option>
|
<option value={2}>2 chars</option>
|
||||||
<option value={3}>3 chars</option>
|
<option value={3}>3 chars</option>
|
||||||
</select>
|
</select>
|
||||||
|
{:else}
|
||||||
|
<span class="text-[9px] opacity-50 italic">loading…</span>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<p class="text-[8px] opacity-40 italic mt-1">
|
<p class="text-[8px] opacity-40 italic mt-1">
|
||||||
* Prefix change requires a full app reload to take
|
* Prefix change requires a full app reload to take
|
||||||
|
|||||||
Reference in New Issue
Block a user