Skip to content

Commit

Permalink
🐛 FIX: some +page.server can have no action (a load only), not it's m…
Browse files Browse the repository at this point in the history
…anaged.
  • Loading branch information
jycouet committed Nov 21, 2023
1 parent cbd7296 commit 113eb68
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/brown-onions-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'vite-plugin-kit-routes': patch
---

fix: some +page.server can have no action (a load only), not it's managed.
2 changes: 1 addition & 1 deletion packages/vite-plugin-kit-routes/src/lib/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ const getActionsOfServerPages = (pathFile: string) => {
if (declarations) {
declarations.forEach((declaration: any) => {
if (declaration.id.name === 'actions') {
const properties = declaration.init.expression.properties
const properties = declaration.init.expression?.properties
if (properties) {
properties.forEach((property: any) => {
actions.push(property.key.name)
Expand Down

1 comment on commit 113eb68

@vercel
Copy link

@vercel vercel bot commented on 113eb68 Nov 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

kitql – ./

kitql.vercel.app
kitql-jycouet.vercel.app
www.kitql.dev
kitql-git-main-jycouet.vercel.app
kitql.dev

Please sign in to comment.