fix(plugin-workflow): workflow collections should not appear in blocks (#2290)

This commit is contained in:
Junyi 2023-07-21 15:19:22 +07:00 committed by GitHub
parent 8c904363ad
commit 5562aca456
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -593,16 +593,10 @@ function Decorator({ params = {}, children }) {
dragSort: false,
};
[nodeCollection, workflowCollection, todoCollection].forEach((collection) => {
if (!collections.find((item) => item.name === collection.name)) {
collections.push(collection);
}
});
return (
<CollectionManagerProvider
{...cm}
collections={[...collections]}
collections={[...collections, nodeCollection, workflowCollection, todoCollection]}
>
<TableBlockProvider {...blockProps}>{children}</TableBlockProvider>
</CollectionManagerProvider>