Skip to content

Commit

Permalink
Merge branch 'v4' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
angrybrad committed Nov 25, 2023
2 parents 3676bc1 + bd2e6fc commit 3074881
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Fixed a PHP error that could occur when you map an entry field with a default value and there is an empty value in the feed. ([#1250](https://github.com/craftcms/feed-me/pull/1250))
- Fixed a bug where the `maxRelations` setting was not being respected for relational fields. ([#1354](https://github.com/craftcms/feed-me/issues/1354))
- Fixed a bug where importing assets with “Use existing assets” could create duplicate assets. ([#1348](https://github.com/craftcms/feed-me/issues/1348))
- Fixed a bug where importing Address data from the Google Maps plugin could cause duplicate Addresses if the Address already existed. ([#1370](https://github.com/craftcms/feed-me/pull/1370))

## 5.2.0 - 2023-07-06

Expand Down
6 changes: 6 additions & 0 deletions src/helpers/DataHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,12 @@ public static function compareElementContent($content, $element): ?bool
$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 3074881

Please sign in to comment.