diff --git a/src/Routing/Routes.php b/src/Routing/Routes.php index 1cdc09b..0878a96 100644 --- a/src/Routing/Routes.php +++ b/src/Routing/Routes.php @@ -74,14 +74,10 @@ class Routes implements ContainerInjectionInterface { // Add a route for all entity types. $route_collection->add($this->createRouteName($entity_type_id), $this->createRoute($entity_type_id)); - // If this entity type has a bundle entity type, - // then add a route for each bundle. - if ($entity_type->getBundleEntityType()) { - // Loop through all the bundles for the entity type. - $bundles_info = $this->entityTypeBundleInfo->getBundleInfo($entity_type_id); - foreach (array_keys($bundles_info) as $bundle) { - $route_collection->add($this->createRouteName($entity_type_id, $bundle), $this->createRoute($entity_type_id, $bundle)); - } + // Loop through all the bundles for the entity type. + $bundles_info = $this->entityTypeBundleInfo->getBundleInfo($entity_type_id); + foreach (array_keys($bundles_info) as $bundle) { + $route_collection->add($this->createRouteName($entity_type_id, $bundle), $this->createRoute($entity_type_id, $bundle)); } } return $route_collection;