mirror of
https://github.com/getgrav/grav.git
synced 2026-05-09 00:37:13 +02:00
Recreated an issue in calling with an array of values {% do assets.addJs('jquery', {'loading':'async'}) %} introduced in d5bd99b363
This commit is contained in:
@@ -251,7 +251,7 @@ class Assets
|
||||
}
|
||||
return $this;
|
||||
} elseif (isset($this->collections[$asset])) {
|
||||
$this->addCss($this->collections[$asset], $priority, $pipeline, $group);
|
||||
$this->add($this->collections[$asset], $priority, $pipeline, $group);
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ class Assets
|
||||
];
|
||||
|
||||
// check for dynamic array and merge with defaults
|
||||
if (func_num_args() == 2) {
|
||||
if (func_num_args() == 3) {
|
||||
$dynamic_arg = func_get_arg(1);
|
||||
if (is_array($dynamic_arg)) {
|
||||
$data = array_merge($data, $dynamic_arg);
|
||||
@@ -309,7 +309,7 @@ class Assets
|
||||
}
|
||||
return $this;
|
||||
} elseif (isset($this->collections[$asset])) {
|
||||
$this->addJs($this->collections[$asset], $priority, $pipeline, $loading, $group);
|
||||
$this->add($this->collections[$asset], $priority, $pipeline, $loading, $group);
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ class Assets
|
||||
];
|
||||
|
||||
// check for dynamic array and merge with defaults
|
||||
if (func_num_args() == 2) {
|
||||
if (func_num_args() == 3) {
|
||||
$dynamic_arg = func_get_arg(1);
|
||||
if (is_array($dynamic_arg)) {
|
||||
$data = array_merge($data, $dynamic_arg);
|
||||
|
||||
Reference in New Issue
Block a user