Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix undefined error on integrations #601

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading