Skip to content

Commit

Permalink
Bootstrap only on site requests
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Dec 20, 2024
1 parent e8c1f03 commit 6696ba0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace putyourlightson\datastar\plugin;

use Craft;
use craft\base\Model;
use craft\base\Plugin as BasePlugin;
use putyourlightson\datastar\Datastar;
Expand All @@ -16,7 +17,9 @@ public function init(): void
{
parent::init();

Datastar::bootstrap();
if (Craft::$app->getRequest()->getIsSiteRequest()) {
Datastar::bootstrap();
}
}

/**
Expand Down

0 comments on commit 6696ba0

Please sign in to comment.