Inertia crashes when a layer prop is not sent from server #1852
Unanswered
honzahana
asked this question in
Help (Svelte)
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Version:
@inertiajs/svelte
version: 1.0.15Describe the problem:
If I put a prop into Layer and this prop is not sent from the server, Intertia crashes and stops working. It crashes even if the default value is set in Svelte.
Laravel source code:
Laravel routes file
./routes/web.php
:Layout file
./resources/js/Pages/AppLayout.svelte
:Page one
./resources/js/Pages/PageOne.svelte
:Page two
./resources/js/Pages/PageTwo.svelte
:Steps to reproduce:
npm run dev
ornpm run build
andphp artisan serve
/page1
, everything works as expected. The user is marked as unknown.I found that if a prop is not an object, but only a string Inertia will not crash.
Beta Was this translation helpful? Give feedback.
All reactions