Skip to content

Commit f9dfd57

Browse files
committed
fix: don't use array destructuring to avoid the use of Symbol
1 parent 4355969 commit f9dfd57

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

modules/RouteNode.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ let isSerialisable = val => val !== undefined && val !== null && val !== ''
44

55
let removeQueryParamsFromPath = (path, params) => {
66
if (path.indexOf('?') === -1) return path
7-
let [pathPart, searchPart] = path.split('?')
7+
const splitPath = path.split('?')
8+
const pathPart = splitPath[0]
9+
const searchPart = splitPath[1]
810

911
let remainingSearchParams = searchPart
1012
.split('&')
1113
.reduce((obj, p) => {
12-
let [key, val] = p.split('=')
14+
const splitParam = p.split('=')
15+
const key = splitParam[0]
16+
const val = splitParam[1]
1317
if (params.indexOf(key) === -1) obj[key] = val || ''
1418
return obj
1519
}, {})

0 commit comments

Comments
 (0)