Skip to content

Commit

Permalink
fix undefined error on integrations (#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
chiragchhatrala authored Oct 24, 2024
1 parent 8a1282f commit 46359fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions api/app/Integrations/Handlers/EmailIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static function getValidationRules(): array

protected 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
Expand Down Expand Up @@ -57,10 +57,10 @@ public function handle(): void

if ($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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 46359fb

Please sign in to comment.