diff --git a/CHANGELOG.md b/CHANGELOG.md index a50b502..ca79bc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,14 @@ ### Fixed - Fix an error in Craft 4.6.0 where dropdown column options weren’t saving correctly. +## 4.0.12 - 2024-08-12 + +### Changed +- Update English translations. + +### Fixed +- Fix an error when initializing the field in some instances. + ## 4.0.11 - 2024-04-29 ### Changed diff --git a/src/fields/TableMakerField.php b/src/fields/TableMakerField.php index dfd37ad..b84800c 100644 --- a/src/fields/TableMakerField.php +++ b/src/fields/TableMakerField.php @@ -201,7 +201,9 @@ public function validateTableData(ElementInterface $element): void $row[$colId] = trim($row[$colId]); } - if (!$this->_validateCellValue($col['type'], $row[$colId], $error)) { + $type = $col['type'] ?? null; + + if ($type && !$this->_validateCellValue($type, $row[$colId], $error)) { $element->addError($this->handle, $error); } }