Skip to content

Beautiful Open-Source Form Builder

Fix last edited in formresource

JhumanJ85b32cb0eaa3
diff --git a/app/Http/Resources/FormResource.php b/app/Http/Resources/FormResource.php
index fe5e5049a..60dfcf696 100644
--- a/app/Http/Resources/FormResource.php
+++ b/app/Http/Resources/FormResource.php
@@ -45,8 +45,8 @@ class FormResource extends JsonResource
'visibility' => $this->visibility,
'notification_emails' => $this->notification_emails,
'slack_webhook_url' => $this->slack_webhook_url,
- 'removed_properties' => $this->removed_properties,
- 'last_edited_human' => $this->updated_at->diffForHumans()
+ 'removed_properties' => $this->removed_properties,
+ 'last_edited_human' => $this->updated_at?->diffForHumans()
] : [];
$baseData = $this->getFilteredFormData(parent::toArray($request), $this->userIsFormOwner());