diff --git a/src/Plugin.php b/src/Plugin.php index 3275dc7..7a831b3 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -5,6 +5,7 @@ namespace putyourlightson\datastar\plugin; +use Craft; use craft\base\Model; use craft\base\Plugin as BasePlugin; use putyourlightson\datastar\Datastar; @@ -16,7 +17,9 @@ public function init(): void { parent::init(); - Datastar::bootstrap(); + if (Craft::$app->getRequest()->getIsSiteRequest()) { + Datastar::bootstrap(); + } } /**