Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Aug 19, 2024
1 parent 2812b25 commit ac6bd8a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/controllers/ComponentsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,11 @@ public function actionRender(): Response
}

Console::addComponent($config);
$content .= Sprig::$core->requests->getRegisteredHtml();

// Remove flashes after rendering, so they don’t appear on subsequent requests.
Craft::$app->getSession()->removeAllFlashes();

$content .= Sprig::$core->requests->getRegisteredHtml();

$response = Craft::$app->getResponse();
$response->statusCode = 200;
$response->format = Response::FORMAT_HTML;
Expand Down

0 comments on commit ac6bd8a

Please sign in to comment.