-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
The Spreading syntax does not work the same way as it does in normal javascript. The spreading (...) syntax of an array into a function gives the wrong value. When imported from a .js file, the function behaves as expected, however when imported from a .jsx file, the function only puts the first value of the array into a new array.
How To Reproduce
-> Create a new vanilla Solid-js application.
-> Create a new jsx file, and make a function that uses the spread
-> call the spreaded function from any other file I.E(the default app)
-> Changing the file extension back to js, changes the behavior.
Minimum Reproduction
//In a File, the source function
function GlobalTest(...arr){
console.log(...arr);
}
//Inside of app.jsx
import {GlobalTest} from 'otherfile'
GlobalTest(1,2,3); // should see a '1' in the log when the source function is in a .jsx
GlobalTest(1,2,3); // should see a '1 2 3' in the log when the source function is in a .jsMetadata
Metadata
Assignees
Labels
No labels