• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

fridays / next-routes / 235
95%

Build:
DEFAULT BRANCH: master
Ran 01 Mar 2018 01:35PM UTC
Jobs 1
Files 1
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
235

Pull #146

travis-ci

web-flow
Decode params before injecting them into `query`

Fixes #145

When urls are constructed in the `Link` component, all params are URI
encoded so that they won't break routing. When params are read however,
they are never decoded. This leads to an inconsistent behavior between
the server and the client when params are passed down the page component
as `query`. On the server, they come down untouched (encoded). On the
client, they are not encoded.

Consider this link:

  <Link route="foo" params={{ b: 'f/g' }}><a>Foo</a></Link>

and this page component

  FooPage.getInitialProps = async ({ query }) => {
    console.log(query.b);
  }

On the server, this page would log "f%2Fg" when navigated to. On the
client it would log "f/g".

By decoding params before they are injected into the `query` params, we
get the same behavior on the client and the server. We also make the
behavior consistent with how regular query params work.
Pull Request #146: Escaped params

77 of 86 branches covered (89.53%)

Branch coverage included in aggregate %.

147 of 147 relevant lines covered (100.0%)

16.31 hits per line

Jobs
ID Job ID Ran Files Coverage
1 235.1 01 Mar 2018 01:35PM UTC 0
96.14
Travis Job 235.1
Source Files on build 235
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #235
  • Pull Request #146
  • PR Base - master (#230)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc