Skip to content

Commit

Permalink
Added check for simple arrays for newValues within existingValues
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyBenusa committed Oct 11, 2023
1 parent 503df96 commit 50ec6da
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/helpers/DataHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,12 @@ public static function compareElementContent($content, $element)
$newValue = null;
}

// If array key & values are already within the existing array
if (is_array($newValue) && is_array($existingValue) && Hash::contains($existingValue,$newValue)) {
unset($trackedChanges[$key]);
continue;
}

// Check for simple fields first
if (self::_compareSimpleValues($fields, $key, $existingValue, $newValue)) {
unset($trackedChanges[$key]);
Expand Down

0 comments on commit 50ec6da

Please sign in to comment.