mirror of
https://github.com/getgrav/grav.git
synced 2026-07-04 15:17:37 +02:00
Merge pull request #623 from getgrav/feature/fix-loading-js-and-css-from-collections
Fix loading js and css from collections
This commit is contained in:
@@ -258,7 +258,7 @@ class Assets
|
||||
}
|
||||
return $this;
|
||||
} elseif (isset($this->collections[$asset])) {
|
||||
$this->add($this->collections[$asset], $priority, $pipeline, $group);
|
||||
$this->addCss($this->collections[$asset], $priority, $pipeline, $group);
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ class Assets
|
||||
];
|
||||
|
||||
// check for dynamic array and merge with defaults
|
||||
if (func_num_args() == 2) {
|
||||
if (func_num_args() > 1) {
|
||||
$dynamic_arg = func_get_arg(1);
|
||||
if (is_array($dynamic_arg)) {
|
||||
$data = array_merge($data, $dynamic_arg);
|
||||
@@ -316,7 +316,7 @@ class Assets
|
||||
}
|
||||
return $this;
|
||||
} elseif (isset($this->collections[$asset])) {
|
||||
$this->add($this->collections[$asset], $priority, $pipeline, $loading, $group);
|
||||
$this->addJs($this->collections[$asset], $priority, $pipeline, $loading, $group);
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -339,10 +339,10 @@ class Assets
|
||||
];
|
||||
|
||||
// check for dynamic array and merge with defaults
|
||||
if (func_num_args() == 2) {
|
||||
if (func_num_args() > 1) {
|
||||
$dynamic_arg = func_get_arg(1);
|
||||
if (is_array($dynamic_arg)) {
|
||||
$data = array_merge($data, $dynamic_arg);
|
||||
$data = array_merge($data, $dynamic_arg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user