diff --git a/src/Plugin/Block/DropdownLanguage.php b/src/Plugin/Block/DropdownLanguage.php
index 6d68f4a..1cedae1 100755
--- a/src/Plugin/Block/DropdownLanguage.php
+++ b/src/Plugin/Block/DropdownLanguage.php
@@ -146,6 +146,13 @@ class DropdownLanguage extends BlockBase implements ContainerFactoryPluginInterf
       $current_language = $this->languageManager->getCurrentLanguage($derivative_id)->getId();
       $links = $this->languageManager->getLanguageSwitchLinks($derivative_id, Url::fromRoute($route)) ?? $this->languageManager->getLanguageSwitchLinks($derivative_id, Url::fromRoute($route))->links;
 
+      if (is_object($links)) {
+        // LanguageManagerInterface::getLanguageSwitchLinks() now returns an
+        // object, or NULL if there are no links.
+        // @see https://www.drupal.org/node/3247792
+        $links = $links->links;
+      }
+
       // Place active language ontop of list.
       if (isset($links[$current_language])) {
         $links = [$current_language => $links[$current_language]] + $links;
