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",
|
path: "/aps",
|
||||||
name: "AccessPoints",
|
name: "AccessPoints",
|
||||||
component: 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",
|
path: "/createAccessPoint",
|
||||||
name: "CreateAccessPoint",
|
name: "CreateAccessPoint",
|
||||||
component: 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",
|
path: "/editAccessPoint",
|
||||||
name: "EditAccessPoint",
|
name: "EditAccessPoint",
|
||||||
component: CreateAccessPoint,
|
component: CreateAccessPoint,
|
||||||
props: (route) => ({
|
props: (route) => ({
|
||||||
apID: Number(route.query["ap-id"]).valueOf(),
|
apID: Number.parseInt(route.query["site-id"] as string),
|
||||||
edit: true,
|
edit: true,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
@ -57,7 +61,7 @@ const routes: RouteRecordRaw[] = [
|
||||||
component: RegisterAccessPoint,
|
component: RegisterAccessPoint,
|
||||||
props: (route) =>
|
props: (route) =>
|
||||||
route.query["ap-id"]
|
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