Skip to content
Snippets Groups Projects
Commit 49da2a80 authored by Erik Seifert's avatar Erik Seifert
Browse files

Fix: better check for storage to use

parent 4e9f78cd
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ use Drupal\layout_builder\Plugin\SectionStorage\SectionStorageBase;
*
* @SectionStorage(
* id = "dashboards",
* weight = 20,
* weight = 10,
* context_definitions = {
* "entity" = @ContextDefinition("entity:dashboard")
* },
......@@ -299,8 +299,8 @@ class DashboardSectionStorage extends SectionStorageBase implements ContainerFac
* @see \Drupal\Core\Cache\RefinableCacheableDependencyInterface
*/
public function isApplicable(RefinableCacheableDependencyInterface $cacheability) {
$contexts = $this->getContexts();
return isset($contexts['view_mode']);
$entity = $this->getContextValue(Dashboard::CONTEXT_TYPE);
return !$entity->isOverriden();
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment