Skip to content

Commit

Permalink
Fixes Segmentation fault on route:cache (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro authored Aug 30, 2023
1 parent 129274b commit 9e99869
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/VoltManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ public function __construct(
*/
public function route(string $uri, string $componentName): Route
{
return $this->router->get($uri, fn () => Container::getInstance()->call([
$this->manager->new($componentName),
'__invoke',
]));
return $this->router->get($uri, function () use ($componentName) {
$container = Container::getInstance();

return $container->call([
$container->make(LivewireManager::class)->new($componentName),
'__invoke',
]);
});
}

/**
Expand Down

0 comments on commit 9e99869

Please sign in to comment.