Merge pull request #761 from directus/fix-755

Fix nested information not loading
This commit is contained in:
Rijk van Zanten
2020-10-23 15:47:03 +02:00
committed by GitHub

View File

@@ -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;
}, []);
}