Skip to content

Commit 143b68b

Browse files
committed
Include default store ID in database check.
1 parent c3eaac2 commit 143b68b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Plugin/RemoveHandlers.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
namespace Vendic\OptimizeCacheSize\Plugin;
1010

1111
use Magento\Framework\View\DesignInterface;
12+
use Magento\Store\Model\Store;
1213
use Magento\Store\Model\StoreManagerInterface;
1314
use Magento\Framework\Exception\LocalizedException;
1415
use Magento\Framework\View\Layout\ProcessorInterface;
@@ -82,8 +83,8 @@ private function hasDbLayoutUpdate(string $handler): bool
8283

8384
if (!isset($this->dbLayoutHandlers[$storeId][$themeId][$handler])) {
8485
$updateCollection = $this->layoutUpdateCollectionFactory->create();
85-
$updateCollection->addStoreFilter($storeId);
8686
$updateCollection->addThemeFilter($themeId);
87+
$updateCollection->addFieldToFilter('store_id', [$storeId, Store::DEFAULT_STORE_ID]);
8788
$updateCollection->addFieldToFilter('handle', $handler);
8889
$this->dbLayoutHandlers[$storeId][$themeId][$handler] = $updateCollection->getSize() > 0;
8990
}

0 commit comments

Comments
 (0)