Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use searchParams in handler.js #35

Merged
merged 1 commit into from
Apr 28, 2021
Merged

Conversation

koheing
Copy link
Contributor

@koheing koheing commented Apr 4, 2021

Hi,
Thank you for a great library!

Summary

I change code in src/files/handler.js: use not query but searchParams.

Why

query is undefined in URL, so page.query property in load function always null.

routes/foo.svelte

<script lang="ts" context="module">
  import type { Load } from '@sveltejs/kit'
  export async function load({ page, fetch }: Parameters<Load>[0]) {
     const bar = page.query.get('xxx')  // If we access `http://***/?bar=123`, bar always null
  }
  ...
</script>

Copy link
Owner

@jthegedus jthegedus left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@jthegedus jthegedus merged commit b2911a0 into jthegedus:main Apr 28, 2021
github-actions bot pushed a commit that referenced this pull request Apr 28, 2021
## [0.5.2](v0.5.1...v0.5.2) (2021-04-28)

### Bug Fixes

* use searchParams in handler.js ([#35](#35)) ([b2911a0](b2911a0))
@github-actions
Copy link
Contributor

🎉 This PR is included in version 0.5.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants