Skip to content

Commit

Permalink
🤦🏻‍♂️
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierbon committed Nov 27, 2023
1 parent 43914a8 commit 7a0913a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/fields/Matrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,10 @@ private function _parseSubField($feedData, $subFieldHandle, $subFieldInfo): mixe

$subField = Hash::extract($this->field->getBlockTypeFields(), '{n}[handle=' . $subFieldHandle . ']')[0];

if (!$subField instanceof $subFieldClassHandle) {
if (
!$subField instanceof $subFieldClassHandle &&
($subField instanceof \craft\fields\Categories || $subField instanceof \craft\fields\Tags)
) {
$subFieldClassHandle = \craft\fields\Entries::class;
}

Expand Down
5 changes: 4 additions & 1 deletion src/fields/SuperTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@ private function _parseSubField($feedData, $subFieldHandle, $subFieldInfo): mixe

$subField = Hash::extract($this->field->getBlockTypeFields(), '{n}[handle=' . $subFieldHandle . ']')[0];

if (!$subField instanceof $subFieldClassHandle) {
if (
!$subField instanceof $subFieldClassHandle &&
($subField instanceof \craft\fields\Categories || $subField instanceof \craft\fields\Tags)
) {
$subFieldClassHandle = \craft\fields\Entries::class;
}

Expand Down

0 comments on commit 7a0913a

Please sign in to comment.