1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-18 08:16:07 +00:00

fix closure trap (#7790)

Co-authored-by: zhouwenxuan <aries@Mac.local>
This commit is contained in:
Aries
2025-05-01 11:19:12 +08:00
committed by GitHub
parent 2316c250c7
commit 47d12d6c82

View File

@@ -150,8 +150,9 @@ export const MetadataViewProvider = ({
if (!Array.isArray(recordsIds) || recordsIds.length === 0) return;
let paths = [];
let fileNames = [];
const table = storeRef.current?.data || metadata;
recordsIds.forEach((recordId) => {
const record = getRowById(metadata, recordId);
const record = getRowById(table, recordId);
const { _parent_dir, _name } = record || {};
if (_parent_dir && _name) {
const path = Utils.joinPath(_parent_dir, _name);