Content-Length: 334009 | pFad | http://togithub.com/vuejs/vue-router/commit/f597959b14887cf0535aa895b6325a2f9348c5cf

41A chore: fix flow and tests · vuejs/vue-router@f597959 · GitHub
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

src/create-matcher.js

Lines changed: 1 addition & 1 deletion
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

src/util/query.js

Lines changed: 2 additions & 2 deletions
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

test/e2e/specs/hash-mode.js

Lines changed: 2 additions & 2 deletions
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://togithub.com/vuejs/vue-router/commit/f597959b14887cf0535aa895b6325a2f9348c5cf

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy