Skip to content

Commit

Permalink
Update is method implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Mar 24, 2024
1 parent 8a43a2e commit dc8d4cb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/framework/src/Support/Models/ExternalRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ public function getLink(): string

public function is(Route|RouteKey|string $route): bool
{
return $route instanceof ExternalRoute && $route->destination === $this->destination;
if ($route instanceof Route) {
return $this->getLink() === $route->getLink();
}

return $this->getLink() === (string) $route;
}

/** @return array{destination: string} */
Expand Down

0 comments on commit dc8d4cb

Please sign in to comment.