Update folderId assignment to include c.folderId

修复导入数据时选择指定文件夹未生效的BUG。
This commit is contained in:
saleacy
2026-04-01 01:06:00 +08:00
committed by Shuai
parent be82c953d6
commit bb0b82f838
+1 -1
View File
@@ -159,7 +159,7 @@ export async function handleCiphersImport(request: Request, env: Env, userId: st
const cipherMapRows: Array<{ index: number; sourceId: string | null; id: string }> = [];
for (let i = 0; i < ciphers.length; i++) {
const c = ciphers[i];
const folderId = cipherFolderMap.get(i) || null;
const folderId = cipherFolderMap.get(i) || c.folderId || null;
const sourceIdRaw = String(c?.id ?? '').trim();
const sourceId = sourceIdRaw || null;