mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
@@ -137,8 +137,14 @@ export async function parseFields(
|
||||
}
|
||||
|
||||
if (name.includes(':')) {
|
||||
const [key, scope] = name.split(':');
|
||||
relationalStructure[key!] = { [scope!]: [] };
|
||||
const [key, scope] = name.split(':') as [string, string];
|
||||
|
||||
if (key in relationalStructure === false) {
|
||||
relationalStructure[key] = { [scope]: [] };
|
||||
} else if (scope in (relationalStructure[key] as CollectionScope) === false) {
|
||||
(relationalStructure[key] as CollectionScope)[scope] = [];
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user