Skip to content

Commit

Permalink
Refactor: remove redundant check
Browse files Browse the repository at this point in the history
  • Loading branch information
schmengler committed May 8, 2020
1 parent 7bd5e25 commit 8bcd2fa
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,11 @@ protected function generateForGlobalScope(
$mergeDataProvider = clone $this->mergeDataProviderPrototype;
$categoryId = $category->getId();
foreach ($category->getStoreIds() as $storeId) {
if ($storeId !== Store::DEFAULT_STORE_ID) {
$category = clone $category; // prevent undesired side effects on original object
}
$category->setStoreId($storeId);
if (!$this->isGlobalScope($storeId)
&& $this->isOverrideUrlsForStore($storeId, $categoryId, $overrideStoreUrls)
) {
$category = clone $category; // prevent undesired side effects on original object
$category->setStoreId($storeId);
$this->updateCategoryUrlForStore($storeId, $category);
$mergeDataProvider->merge($this->generateForSpecificStoreView($storeId, $category, $rootCategoryId));
}
Expand Down

0 comments on commit 8bcd2fa

Please sign in to comment.