Skip to content

Commit

Permalink
Merge pull request #17 from boxuk/fix-impose-of-existing-data
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Jenkins authored Mar 14, 2022
2 parents 03e1806 + eeeabb6 commit d292b3e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,8 @@ public function impose(array $args, array $assocArgs): void
foreach ($differences as $slug => $difference) {
$this->showDifference($slug, $difference);

$toImpose = Utils::arrayDiffRecursive($difference['dictated'], $difference['current']);

try {
$regionObj->impose($slug, $toImpose);
$regionObj->impose($slug, $difference['dictated'] ?? []);
} catch (CouldNotImposeRegionException $e) {
WP_CLI::warning($e->getMessage());
}
Expand Down

0 comments on commit d292b3e

Please sign in to comment.