Move collection description rendering to JSON (#6944)
* First pass, moving collection description rendering to JSON * tsc * docs * refactor * test
This commit is contained in:
@@ -129,15 +129,14 @@ export default class ImportJSONTask extends ImportTask {
|
||||
}
|
||||
|
||||
const collectionId = uuidv4();
|
||||
const data = item.collection.description ?? item.collection.data;
|
||||
|
||||
output.collections.push({
|
||||
...item.collection,
|
||||
description:
|
||||
item.collection.description &&
|
||||
typeof item.collection.description === "object"
|
||||
? serializer.serialize(
|
||||
Node.fromJSON(schema, item.collection.description)
|
||||
)
|
||||
: item.collection.description,
|
||||
data && typeof data === "object"
|
||||
? serializer.serialize(Node.fromJSON(schema, data))
|
||||
: data,
|
||||
id: collectionId,
|
||||
externalId: item.collection.id,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user