Beautiful Open-Source Form Builder
fix undefined error on integrations (#601)
Chirag Chhatrala46359fb12775
diff --git a/api/app/Integrations/Handlers/EmailIntegration.php b/api/app/Integrations/Handlers/EmailIntegration.phpindex d425c3456..977e8e01f 100644--- a/api/app/Integrations/Handlers/EmailIntegration.php+++ b/api/app/Integrations/Handlers/EmailIntegration.php@@ -28,7 +28,7 @@ class EmailIntegration extends AbstractEmailIntegrationHandlerprotected function shouldRun(): bool{- return $this->integrationData->send_to && parent::shouldRun() && !$this->riskLimitReached();+ return $this->integrationData?->send_to && parent::shouldRun() && !$this->riskLimitReached();}// To avoid phishing abuse we limit this feature for risky users@@ -57,10 +57,10 @@ class EmailIntegration extends AbstractEmailIntegrationHandlerif ($this->form->is_pro) { // For Send to field Mentions are Pro feature$formatter = (new FormSubmissionFormatter($this->form, $this->submissionData))->outputStringsOnly();- $parser = new MentionParser($this->integrationData->send_to, $formatter->getFieldsWithValue());+ $parser = new MentionParser($this->integrationData?->send_to, $formatter->getFieldsWithValue());$sendTo = $parser->parse();} else {- $sendTo = $this->integrationData->send_to;+ $sendTo = $this->integrationData?->send_to;}$recipients = collect(preg_split("/\r\n|\n|\r/", $sendTo))diff --git a/client/components/open/integrations/components/IntegrationCard.vue b/client/components/open/integrations/components/IntegrationCard.vueindex 05dfacd35..43a76f148 100644--- a/client/components/open/integrations/components/IntegrationCard.vue+++ b/client/components/open/integrations/components/IntegrationCard.vue@@ -203,7 +203,7 @@ const showIntegrationEventsModal = ref(false)const loadingDelete = ref(false)const actionsComponent = computed(() => {- if(integrationTypeInfo.value.actions_file_name) {+ if(integrationTypeInfo.value?.actions_file_name || false) {return resolveComponent(integrationTypeInfo.value.actions_file_name)}