diff --git a/src/View.php b/src/View.php index b29b33d45b..826682efdf 100644 --- a/src/View.php +++ b/src/View.php @@ -1017,16 +1017,7 @@ public function jsRender(): string }; // Dealing with callback action. - if ($action instanceof \Closure || (is_array($action) && ($action[0] ?? null) instanceof \Closure)) { - if (is_array($action)) { - $urlData = $action; - unset($urlData[0]); - foreach ($urlData as $a) { - $actions[] = $a; - } - $action = $action[0]; - } - + if ($action instanceof \Closure) { // create callback, that will include event as part of the full name $cb = JsCallback::addTo($this, [], [['desired_name' => $event]]); if ($defaults['apiConfig'] ?? null) {