From c89223fe6d55551fe1da5be724f069dafc84b666 Mon Sep 17 00:00:00 2001
From: Akanksha <akankshasingh.viet@gmail.com>
Date: Thu, 9 May 2024 18:03:13 -0300
Subject: [PATCH] Early exit with disabled check

---
 src/IslandoraContextManager.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/IslandoraContextManager.php b/src/IslandoraContextManager.php
index 9fd93fbc..ed6f74af 100644
--- a/src/IslandoraContextManager.php
+++ b/src/IslandoraContextManager.php
@@ -37,7 +37,7 @@ class IslandoraContextManager extends ContextManager {
     }
     /** @var \Drupal\context\ContextInterface $context */
     foreach ($this->getContexts() as $context) {
-      if ($this->evaluateContextConditions($context, $provided) && !$context->disabled()) {
+      if (!$context->disabled() && $this->evaluateContextConditions($context, $provided)) {
         $this->activeContexts[$context->id()] = $context;
       }
     }