From 942271ae39e96892c9a6ca2ca2ba71e5feda49fb Mon Sep 17 00:00:00 2001 From: tomguluson92 <314913739@qq.com> Date: Mon, 2 Dec 2024 17:22:49 +0800 Subject: [PATCH] uuid compatible for number --- packages/core/src/uuid.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/uuid.ts b/packages/core/src/uuid.ts index dd188cdaf7..2227eca213 100644 --- a/packages/core/src/uuid.ts +++ b/packages/core/src/uuid.ts @@ -1,7 +1,7 @@ import { sha1 } from "js-sha1"; import { UUID } from "./types.ts"; -export function stringToUuid(target: string): UUID { +export function stringToUuid(target: string | number): UUID { if (typeof target === "number") { target = (target as number).toString(); }