question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

query compat with vue-routers `LocationObject`

See original GitHub issue

Hey 👋🏻

Right now, query methods, mainly withQuery, is not compatible with vue-routers LocationQuery.

vue-router:

type LocationQueryValue = string | null;
type LocationQuery = Record<string, LocationQueryValue | LocationQueryValue[]>;

ufo:

type QueryValue = string | string[] | undefined;
type QueryObject = Record<string, QueryValue>;

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
manniLcommented, Nov 24, 2022

Well we can’t guarantee this always since ufo is used for other places than vue

Absolutely, but it felt like a low-hanging fruit 😋

Do you mind to try if adding null fixes compatibility or what other changes would be needed to do this?

Sadly does not look like.

0reactions
manniLcommented, Nov 24, 2022

Thank you! 😋

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue Router and the Composition API
The introduction of setup and Vue's Composition API, open up new possibilities but to be able to get the full potential out of...
Read more >
Query parser doesn't support nested objects #1268
In your vue-router enabled vue app, push a nested object as the router query. For example, take the following statement:.
Read more >
How to Use Vue Router: A Complete Tutorial
The first route object has a path / which means this is going to be our base URL. The component property represents what...
Read more >
Vue-Router: Globally Add Query Value to Routes
router.beforeEach((to, from, next) => { if (!to.query.
Read more >
Vue Router Tutorial
The Vue Router · Introduction · Installation · The router object · Defining the routes · Using named routes to pass parameters to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found