Skip to content

Commit

Permalink
chore: fix flow and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Oct 6, 2020
1 parent 607ce2d commit f597959
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/create-matcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function matchRoute (
m = decodeURI(path).match(regex)
} catch (err) {
if (process.env.NODE_ENV !== 'production') {
warn(`Error decoding "${path}". Leaving it intact.`)
warn(false, `Error decoding "${path}". Leaving it intact.`)
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/util/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ const encode = str =>
.replace(encodeReserveRE, encodeReserveReplacer)
.replace(commaRE, ',')

export function decode (str) {
export function decode (str: string) {
try {
return decodeURIComponent(str)
} catch (err) {
if (process.env.NODE_ENV !== 'production') {
warn(`Error decoding "${str}". Leaving it intact.`)
warn(false, `Error decoding "${str}". Leaving it intact.`)
}
}
return str
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/specs/hash-mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ module.exports = {
browser
.url('http://localhost:8080/hash-mode/')
.waitForElementVisible('#app', 1000)
.assert.count('li', 9)
.assert.count('li a', 8)
.assert.count('li', 12)
.assert.count('li a', 11)
.assert.attributeContains('li:nth-child(1) a', 'href', '/hash-mode/#/')
.assert.attributeContains('li:nth-child(2) a', 'href', '/hash-mode/#/foo')
.assert.attributeContains('li:nth-child(3) a', 'href', '/hash-mode/#/bar')
Expand Down

0 comments on commit f597959

Please sign in to comment.