grommet / jsx-to-string

Parse your React JSX component to string
MIT License
124 stars 26 forks source link

After updating to 1.2.0 not possible to stringify array #31

Open johanboon opened 6 years ago

johanboon commented 6 years ago

Hi,

I'm trying to convert a div with an array inside it but it removes the array completely from the output. With version 1.1.0 it worked fine but after the update 1.2.0 it breaks.

Here is a test which fails with 1.2.0:

it('jsx-to-str with array input', () => { const inputArray = ['input1', 'input2']; const output = JsxToString( <div>{inputArray}</div>, );

expect(output).toContain('input1');
expect(output).toContain('input2');

});

regards, Johan