Skip to content

Commit

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

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

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

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

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

if (
!$subField instanceof $subFieldClassHandle &&
$subField instanceof \verbb\supertable\fields\SuperTableField
) {
if (!$subField instanceof $subFieldClassHandle) {
$subFieldClassHandle = \craft\fields\Entries::class;
}

Expand Down

0 comments on commit 43914a8

Please sign in to comment.