diff --git a/src/ContextProvider/LayoutBuilder.php b/src/ContextProvider/LayoutBuilder.php
index 5717907..7891ada 100644
--- a/src/ContextProvider/LayoutBuilder.php
+++ b/src/ContextProvider/LayoutBuilder.php
@@ -80,8 +80,10 @@ final class LayoutBuilder extends RouteAwareContextProviderBase {
     // this method open by reflection).
     if ($entity_type_id === 'entity_view_display') {
       $entity_type_id = $this->routeMatch->getParameter('entity_type_id');
+      // If there is no bundle_key parameter, the entity type whose layout we
+      // editing does not support bundles.
       $bundle_key = $this->routeMatch->getParameter('bundle_key');
-      $bundle = $this->routeMatch->getParameter($bundle_key);
+      $bundle = isset($bundle_key) ? $this->routeMatch->getParameter($bundle_key) : $entity_type_id;
       $view_mode = $this->routeMatch->getParameter('view_mode_name');
 
       $display = $this->entityDisplayRepository->getViewDisplay($entity_type_id, $bundle, $view_mode);
diff --git a/tests/src/Functional/LayoutBuilderIntegrationTest.php b/tests/src/Functional/LayoutBuilderIntegrationTest.php
index ffdb924..d903f6a 100644
--- a/tests/src/Functional/LayoutBuilderIntegrationTest.php
+++ b/tests/src/Functional/LayoutBuilderIntegrationTest.php
@@ -280,4 +280,23 @@ class LayoutBuilderIntegrationTest extends BrowserTestBase {
     }
   }
 
+  /**
+   * Tests integration with Layout Builder for non-bundleable entity types.
+   */
+  public function testNonBundleableEntityType() {
+    $this->container->get('entity_display.repository')
+      ->getViewDisplay('user', 'user')
+      ->enableLayoutBuilder()
+      ->save();
+
+    $account = $this->drupalCreateUser([
+      'administer user display',
+      'configure any layout',
+    ]);
+    $this->drupalLogin($account);
+
+    $this->drupalGet('/admin/config/people/accounts/display/default/layout');
+    $this->assertSession()->statusCodeEquals(200);
+  }
+
 }
