mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-15 13:58:24 +08:00
Fix for asset command.
This commit is contained in:
@@ -575,13 +575,9 @@ class View extends Component
|
||||
if (!isset($this->assetBundles[$name])) {
|
||||
$am = $this->getAssetManager();
|
||||
$bundle = $am->getBundle($name);
|
||||
if ($bundle !== null) {
|
||||
$this->assetBundles[$name] = false;
|
||||
$bundle->registerAssets($this);
|
||||
$this->assetBundles[$name] = true;
|
||||
} else {
|
||||
throw new InvalidConfigException("Unknown asset bundle: $name");
|
||||
}
|
||||
$this->assetBundles[$name] = false;
|
||||
$bundle->registerAssets($this);
|
||||
$this->assetBundles[$name] = true;
|
||||
} elseif ($this->assetBundles[$name] === false) {
|
||||
throw new InvalidConfigException("A circular dependency is detected for bundle '$name'.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user