Comparing version 0.0.89 to 0.0.90
{ | ||
"name": "webdetta", | ||
"version": "0.0.89", | ||
"version": "0.0.90", | ||
"author": "Fedot Kriutchenko <fodyadev@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "", |
@@ -42,12 +42,8 @@ const splitPath = path => | ||
const currentRoute = (routes, loc) => { | ||
const currentRoute = (routesList, loc) => { | ||
const search = Object.fromEntries( | ||
new URLSearchParams(loc.search).entries() | ||
); | ||
const res = { | ||
route: null, | ||
params: search, | ||
location: loc | ||
}; | ||
for (const route of Object.entries(routes)) { | ||
const res = { route: null, params: search, location: loc }; | ||
for (const route of routesList) { | ||
const params = parsePath(route.path, loc.pathname); | ||
@@ -87,3 +83,3 @@ if (params) { | ||
const current = () => currentRoute(routes, driver.get()); | ||
const current = () => currentRoute(Object.values(routes), driver.get()); | ||
@@ -90,0 +86,0 @@ return { |
101191
2991