mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04:00
fix nested information not loading
This commit is contained in:
@@ -30,7 +30,7 @@ export default function usePreview(
|
||||
|
||||
return fields.reduce((acc: string[], field) => {
|
||||
const sections = field.split('.');
|
||||
if (junctionField === sections[0] && sections.length === 2) acc.push(sections[1]);
|
||||
if (junctionField === sections[0] && sections.length >= 2) acc.push(sections.slice(1).join('.'));
|
||||
return acc;
|
||||
}, []);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user