Commit 08d4c5af authored by Emmanuel Libbrecht's avatar Emmanuel Libbrecht
Browse files

Issue #3322169: TypeError:...

Issue #3322169: TypeError: Drupal\route_in_modal\ModalRouteHelper::routeHasModal(): Argument #1 ($route) must be of type string, null given
parent 9a908536
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -41,13 +41,13 @@ class ModalRouteHelper {
  /**
   * Check if route is configured to open in modal.
   *
   * @param string $route
   * @param string|null $route
   *   The route to check.
   *
   * @return bool
   *   True if route is configured to open in modal, false otherwise.
   */
  public function routeHasModal(string $route): bool {
  public function routeHasModal(?string $route): bool {
    return in_array($route, $this->getRoutes(), TRUE);
  }