diff --git a/system/src/Grav/Common/Assets.php b/system/src/Grav/Common/Assets.php index ad310dc15..833a34607 100644 --- a/system/src/Grav/Common/Assets.php +++ b/system/src/Grav/Common/Assets.php @@ -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); } }