Skip to content

Commit f597959

Browse files
committed
chore: fix flow and tests
1 parent 607ce2d commit f597959

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Diff for: src/create-matcher.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ function matchRoute (
180180
m = decodeURI(path).match(regex)
181181
} catch (err) {
182182
if (process.env.NODE_ENV !== 'production') {
183-
warn(`Error decoding "${path}". Leaving it intact.`)
183+
warn(false, `Error decoding "${path}". Leaving it intact.`)
184184
}
185185
}
186186

Diff for: src/util/query.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ const encode = str =>
1414
.replace(encodeReserveRE, encodeReserveReplacer)
1515
.replace(commaRE, ',')
1616

17-
export function decode (str) {
17+
export function decode (str: string) {
1818
try {
1919
return decodeURIComponent(str)
2020
} catch (err) {
2121
if (process.env.NODE_ENV !== 'production') {
22-
warn(`Error decoding "${str}". Leaving it intact.`)
22+
warn(false, `Error decoding "${str}". Leaving it intact.`)
2323
}
2424
}
2525
return str

Diff for: test/e2e/specs/hash-mode.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ module.exports = {
99
browser
1010
.url('http://localhost:8080/hash-mode/')
1111
.waitForElementVisible('#app', 1000)
12-
.assert.count('li', 9)
13-
.assert.count('li a', 8)
12+
.assert.count('li', 12)
13+
.assert.count('li a', 11)
1414
.assert.attributeContains('li:nth-child(1) a', 'href', '/hash-mode/#/')
1515
.assert.attributeContains('li:nth-child(2) a', 'href', '/hash-mode/#/foo')
1616
.assert.attributeContains('li:nth-child(3) a', 'href', '/hash-mode/#/bar')

0 commit comments

Comments
 (0)