diff --git a/src/CoreShop/Component/StorageList/Core/Storage/SessionStorageListStorage.php b/src/CoreShop/Component/StorageList/Core/Storage/SessionStorageListStorage.php index 6f48d8f9cd..0f22220046 100644 --- a/src/CoreShop/Component/StorageList/Core/Storage/SessionStorageListStorage.php +++ b/src/CoreShop/Component/StorageList/Core/Storage/SessionStorageListStorage.php @@ -69,6 +69,10 @@ public function setForContext(array $context, StorageListInterface $storageList) throw new \InvalidArgumentException('Session is not available'); } + if (null === $storageList->getId()) { + return; + } + $this->getSession()->set($this->getKeyName($context), $storageList->getId()); }