Skip to content

Why is event.params.[paramName] possibly undefined when used inside actions and not when used inside the load function? #13448

Answered by geodask
dadezzz asked this question in Q&A
Discussion options

You must be logged in to vote

Make sure you are importing Actions like this:

import { Actions } from "./$types";

and not

import { Actions } from "@sveltejs/kit";

In this way you will get the route specific types.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@brunnerh
Comment options

@geodask
Comment options

@dadezzz
Comment options

@geodask
Comment options

Answer selected by dadezzz
@dadezzz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants