better-auth-ui-svelte 0.12.2 → 0.12.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -157,6 +157,12 @@
157
157
  const organizationRefetching = $derived(currentOrgResult.isRefetching);
158
158
  const organizationRefetch = currentOrgResult.refetch;
159
159
 
160
+ // Whether there are any non-active orgs or personal account rendered above additionalOrganizations
161
+ const hasItemsAboveAdditional = $derived(
162
+ (!hidePersonal && !!activeOrganization) ||
163
+ (organizations ?? []).some((o) => o.id !== activeOrganization?.id)
164
+ );
165
+
160
166
  // Smarter pending logic: Only show loading if we're truly waiting for data
161
167
  // If we have organizations list, we can show the UI even if active org is still loading
162
168
  const isPending = $derived(
@@ -396,7 +402,9 @@
396
402
  {/each}
397
403
 
398
404
  {#if additionalOrganizations && additionalOrganizations.items.length > 0}
399
- <DropdownMenu.Separator class={classNames?.content?.separator} />
405
+ {#if hasItemsAboveAdditional}
406
+ <DropdownMenu.Separator class={classNames?.content?.separator} />
407
+ {/if}
400
408
  <div class="px-2 py-1.5 text-xs font-medium text-muted-foreground">
401
409
  {additionalOrganizations.label}
402
410
  </div>
@@ -418,7 +426,9 @@
418
426
  {/if}
419
427
 
420
428
  {#if organizations && organizations.length > 0 && (!hidePersonal || organizations.length > 1)}
421
- <DropdownMenu.Separator class={classNames?.content?.separator} />
429
+ {#if hasItemsAboveAdditional}
430
+ <DropdownMenu.Separator class={classNames?.content?.separator} />
431
+ {/if}
422
432
  {/if}
423
433
 
424
434
  {#if !isPending && sessionData && !user?.isAnonymous}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-auth-ui-svelte",
3
- "version": "0.12.2",
3
+ "version": "0.12.4",
4
4
  "description": "Pre-built authentication UI components for Better Auth in Svelte 5",
5
5
  "scripts": {
6
6
  "dev": "vite dev",