Skip to content

Commit f75f015

Browse files
committed
Do not register bundles for cp requests
1 parent ee5652a commit f75f015

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# ryssbowh/craft-themes Changelog
22

3+
## 2.1.5 - 2021-08-17
4+
5+
### Fixed
6+
- Do not register bundles for cp requests
7+
38
## 2.1.4 - 2021-07-14
49

510
### Fixed

src/Themes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ protected function resolveTheme(RegisterTemplateRootsEvent $event)
119119
\Yii::setAlias('@themePath', '@root/themes/' . $theme->handle);
120120
\Yii::setAlias('@themeWebPath', '@webroot/themes/' . $theme->handle);
121121
$event->roots[''] = array_merge($theme->getTemplatePaths(), $event->roots[''] ?? []);
122-
if (\Craft::$app->request instanceof Request) {
122+
if (\Craft::$app->request instanceof Request and \Craft::$app->request->isSiteRequest) {
123123
$path = \Craft::$app->request->getPathInfo();
124124
$theme->registerAssetBundles($path);
125125
}

0 commit comments

Comments
 (0)