Skip to content

Action's parameters are not being passed correctly #5173

Closed
@yuliankarapetkov

Description

@yuliankarapetkov

Describe the bug
When you pass a list of parameters to an action, only the last parameter in the list is being received by the function. What's more, the parameter is being "moved" to the first position.

<script>	
	function test (node, el1, el2, el3) {
		console.log(el1, el2, el3) // logs `third undefined undefined`, instead of `first second third`
	}
</script>

<h1 use:test={'first', 'second', 'third'}>Hello!</h1>

This used to work in 3.12.1 but it doesn't work in 3.24.0

To Reproduce
Open the this REPL and see the logs. Compare the logs with that one.

Expected behavior
Parameters should be passed correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions