diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/filter/TaxonomyIndexTid.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/filter/TaxonomyIndexTid.php
index fa8f3de..f854716 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/filter/TaxonomyIndexTid.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/filter/TaxonomyIndexTid.php
@@ -138,15 +138,9 @@ function value_form(&$form, &$form_state) {
     }
     else {
       if (!empty($this->options['hierarchy']) && $this->options['limit']) {
-        $tree = taxonomy_get_tree($vocabulary->vid);
         $options = array();
-
-        if ($tree) {
-          foreach ($tree as $term) {
-            $choice = new stdClass();
-            $choice->option = array($term->tid => str_repeat('-', $term->depth) . $term->name);
-            $options[] = $choice;
-          }
+        foreach (taxonomy_get_tree($vocabulary->vid) as $term) {
+          $options[$term->tid] = str_repeat('-', $term->depth) . $term->name;
         }
       }
       else {
