修复:旧浏览器样式与安全操作编号兼容,复用已完成的 Windows 数据库恢复
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { createRequestUuid } from './requestUuid.ts';
|
||||
/** Internal catalog identity never needs user input. Existing identities survive renames. */
|
||||
export function newMasterDataCode(existing: Iterable<string>): string {
|
||||
const used = existing instanceof Set ? existing : new Set(existing);
|
||||
let code: string;
|
||||
do { code = `REF-${crypto.randomUUID()}`; } while (used.has(code));
|
||||
do { code = `REF-${createRequestUuid()}`; } while (used.has(code));
|
||||
return code;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user