fix(exchange-rate-guard): evitar SSR de CreateEditDialog con {#if browser}
Dialog.Portal intenta instanciar clases del DOM durante SSR causando 'Class constructors cannot be invoked without new' en GET /dashboard. El diálogo es puramente client-side, no necesita renderizado en servidor. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { browser } from '$app/environment';
|
||||
import { companyStore } from '$lib/stores/company.svelte';
|
||||
import { uiStore } from '$lib/stores/ui.svelte';
|
||||
import { getExchangeRates } from '$lib/api/dashboard/a76/general_catalogs/exchange-rate';
|
||||
@@ -69,4 +70,6 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<CreateEditDialog bind:open onSuccess={handleSuccess} {overlayClass} />
|
||||
{#if browser}
|
||||
<CreateEditDialog bind:open onSuccess={handleSuccess} {overlayClass} />
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user