Skip to content

Commit

Permalink
Fix a compatibility issue with Formie and Entries fields
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Mar 27, 2024
1 parent 7238603 commit 74d315b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/services/SinglesList.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ public function createSinglesList(RegisterElementSourcesEvent $event): void

// Insert some JS to go straight to single page when clicked - rather than listing in Index Table
if (ExpandedSingles::$plugin->getSettings()->redirectToEntry) {
Craft::$app->getView()->registerAssetBundle(ExpandedSinglesAsset::class);
// Only output this for CP-requests, as this can be called from the front-end.
if (Craft::$app->getRequest()->getIsCpRequest()) {
Craft::$app->getView()->registerAssetBundle(ExpandedSinglesAsset::class);
}
}
}

Expand Down

0 comments on commit 74d315b

Please sign in to comment.