diff --git a/src/Plugin/views/argument/IndexNameDepth.php b/src/Plugin/views/argument/IndexNameDepth.php
index a51f97b..654aa40 100644
--- a/src/Plugin/views/argument/IndexNameDepth.php
+++ b/src/Plugin/views/argument/IndexNameDepth.php
@@ -165,7 +165,14 @@ class IndexNameDepth extends ArgumentPluginBase {
         return FALSE;
       }
 
-      $operator = (count($break->value) > 1) ? 'IN' : '=';
+      if (count($break->value) > 1) {
+        $operator = 'IN';
+      }
+      else {
+        $operator = '=';
+        // Convert the value to a scalar if using the '=' operator.
+        $break->value = reset($break->value);
+      }
       $tids = $break->value;
     }
     else {
diff --git a/views_taxonomy_term_name_depth.info.yml b/views_taxonomy_term_name_depth.info.yml
index f4c81e9..3912780 100644
--- a/views_taxonomy_term_name_depth.info.yml
+++ b/views_taxonomy_term_name_depth.info.yml
@@ -2,6 +2,6 @@ name: Views Taxonomy Term Name Depth
 type: module
 description: The module provides the Views plugin for Contextual filter with Taxonomy Term Name Depth.
 package: Views
-core_version_requirement: ^9 || ^10
+core_version_requirement: ^9 || ^10 || ^11
 dependencies:
 - pathauto:pathauto
