kenchris / lit-element

A base class for creating web components using lit-html
BSD 3-Clause "New" or "Revised" License
81 stars 10 forks source link

Correct setter for Array (Issue#21) #23

Closed rogeru closed 6 years ago

rogeru commented 6 years ago

When setting an array property, the code const value = typeFn(v); at https://github.com/kenchris/lit-element/blob/master/src/lit-element.ts#L57 wraps the array value into another array.

This change skips converting the value into an array as this creates an array of an array.

kenchris commented 6 years ago

Thanks for the patch!