Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: fix internal plugs with empty

Nevo Davidb13a862b65ca
diff --git a/apps/frontend/src/components/launches/calendar.tsx b/apps/frontend/src/components/launches/calendar.tsx
index ada4e0e99..15a3fc15d 100644
--- a/apps/frontend/src/components/launches/calendar.tsx
+++ b/apps/frontend/src/components/launches/calendar.tsx
@@ -15,7 +15,7 @@ import {
useCalendar,
} from '@gitroom/frontend/components/launches/calendar.context';
import dayjs from 'dayjs';
-import { openModal, useModals } from '@mantine/modals';
+import { useModals } from '@mantine/modals';
import { AddEditModal } from '@gitroom/frontend/components/launches/add.edit.model';
import clsx from 'clsx';
import { useFetch } from '@gitroom/helpers/utils/custom.fetch';
@@ -23,8 +23,6 @@ import { ExistingDataContextProvider } from '@gitroom/frontend/components/launch
import { useDrag, useDrop } from 'react-dnd';
import { Integration, Post, State } from '@prisma/client';
import { useAddProvider } from '@gitroom/frontend/components/launches/add.provider.component';
-import { CommentComponent } from '@gitroom/frontend/components/launches/comments/comment.component';
-import { useSWRConfig } from 'swr';
import { useToaster } from '@gitroom/react/toaster/toaster';
import { useUser } from '@gitroom/frontend/components/layout/user.context';
import { IntegrationContext } from '@gitroom/frontend/components/launches/helpers/use.integration';
diff --git a/libraries/nestjs-libraries/src/database/prisma/posts/posts.service.ts b/libraries/nestjs-libraries/src/database/prisma/posts/posts.service.ts
index 241dfb92f..5265ed887 100644
--- a/libraries/nestjs-libraries/src/database/prisma/posts/posts.service.ts
+++ b/libraries/nestjs-libraries/src/database/prisma/posts/posts.service.ts
@@ -374,8 +374,8 @@ export class PostsService {
active: boolean;
}[] = Object.values(parsePlugs);
- for (const trigger of list) {
- for (const int of trigger.integrations) {
+ for (const trigger of list || []) {
+ for (const int of trigger?.integrations || []) {
this._workerServiceProducer.emit('internal-plugs', {
id: 'plug_' + id + '_' + trigger.name + '_' + int.id,
options: {