diff --git a/src/Form/FormWithFields.php b/src/Form/FormWithFields.php
index c3c965db86b12fa6ef9ae8c0ed7ca19f5919762b..8d4961d02c541ee2170cbf5b792509143461e7cb 100644
--- a/src/Form/FormWithFields.php
+++ b/src/Form/FormWithFields.php
@@ -180,6 +180,10 @@ class FormWithFields implements Form, ContainerForm, FieldProvider {
 	}
 
 	public function get_data(): array {
+		if ( empty( $this->get_fields() ) ) {
+			return [];
+		}
+
 		$data = $this->updated_data;
 
 		foreach ( $this->get_fields() as $field ) {