Skip to content

Commit 7d87e43

Browse files
authored
fix: do not apply admin theme if emulation has applied a different scope (#5)
Early return for non-admin areas
2 parents 2a4359c + e62a982 commit 7d87e43

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Plugin/ThemeAdminhtmlSwitcherPlugin.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Magento\Framework\App\Config\ScopeConfigInterface;
66
use Magento\Store\Model\ScopeInterface;
77
use Magento\Theme\Model\View\Design;
8+
use Magento\Framework\App\Area;
89

910
class ThemeAdminhtmlSwitcherPlugin
1011
{
@@ -30,6 +31,10 @@ public function __construct(
3031
*/
3132
public function beforeSetDesignTheme(Design $subject, $themeId = null)
3233
{
34+
if ($subject->getArea() !== Area::AREA_ADMINHTML) {
35+
return [$themeId];
36+
}
37+
3338
$isEnabled = $this->scopeConfig->isSetFlag(
3439
'admin/system_admin_design/enable_theme_adminhtml_m137',
3540
ScopeConfigInterface::SCOPE_TYPE_DEFAULT

0 commit comments

Comments
 (0)