fix/refactor(router): don't use Number constructor
This commit is contained in:
parent
585fdb76f8
commit
15d1e3ad37
1 changed files with 8 additions and 4 deletions
|
@ -34,20 +34,24 @@ const routes: RouteRecordRaw[] = [
|
|||
path: "/aps",
|
||||
name: "AccessPoints",
|
||||
component: AccessPoints,
|
||||
props: (route) => ({ siteID: Number(route.query["site-id"]).valueOf() }),
|
||||
props: (route) => ({
|
||||
siteID: Number.parseInt(route.query["site-id"] as string),
|
||||
}),
|
||||
},
|
||||
{
|
||||
path: "/createAccessPoint",
|
||||
name: "CreateAccessPoint",
|
||||
component: CreateAccessPoint,
|
||||
props: (route) => ({ siteID: Number(route.query["site-id"]).valueOf() }),
|
||||
props: (route) => ({
|
||||
siteID: Number.parseInt(route.query["site-id"] as string),
|
||||
}),
|
||||
},
|
||||
{
|
||||
path: "/editAccessPoint",
|
||||
name: "EditAccessPoint",
|
||||
component: CreateAccessPoint,
|
||||
props: (route) => ({
|
||||
apID: Number(route.query["ap-id"]).valueOf(),
|
||||
apID: Number.parseInt(route.query["site-id"] as string),
|
||||
edit: true,
|
||||
}),
|
||||
},
|
||||
|
@ -57,7 +61,7 @@ const routes: RouteRecordRaw[] = [
|
|||
component: RegisterAccessPoint,
|
||||
props: (route) =>
|
||||
route.query["ap-id"]
|
||||
? { apID: Number(route.query["ap-id"]).valueOf() }
|
||||
? { apID: Number.parseInt(route.query["site-id"] as string) }
|
||||
: {},
|
||||
},
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue