Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Return idFromSlug as int to make the whole issue detail reactive again

天舟1ac38264ed03
diff --git a/frontend/src/utils/slug.ts b/frontend/src/utils/slug.ts
index 8b9c0dae4c..4fe0d2c772 100644
--- a/frontend/src/utils/slug.ts
+++ b/frontend/src/utils/slug.ts
@@ -7,10 +7,11 @@ import {
IssueId,
} from "../types";
import slug from "slug";
+import { IdType } from "../types/id";
-export function idFromSlug(slug: string) {
+export function idFromSlug(slug: string): IdType {
const parts = slug.split("-");
- return parts[parts.length - 1];
+ return parseInt(parts[parts.length - 1]);
}
export function indexFromSlug(slug: string): number {