fix: import fix

This commit is contained in:
xion 2025-01-03 21:23:23 +08:00
parent 50c87043c8
commit 871aac104a
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package",
"name": "@kevisual/router",
"version": "0.0.6-alpha-4",
"version": "0.0.6-alpha-5",
"description": "",
"main": "dist/index.js",
"module": "dist/index.js",

View File

@ -274,7 +274,7 @@ export class QueryRouter {
const has = this.routes.find((r) => r.path === route.path && r.key === route.key);
if (has) {
// remove the old route
this.routes = this.routes.filter((r) => r.path === route.path && r.key === route.key);
this.routes = this.routes.filter((r) => r.id !== has.id);
}
this.routes.push(route);
}