ckastbjerg / next-type-safe-routes

Never should your users experience broken links again!
MIT License
70 stars 5 forks source link

Exclude `undefined` query params #38

Open longlostnick opened 2 years ago

longlostnick commented 2 years ago

Right now if you do something like this:

getRoute({
  route: '/my-page',
  query: {
    thing: undefined,
  }
});

You get this:

/my-page?thing=undefined

Would it make sense to just exclude or strip out query params that are undefined?