tmpvar / weld

Template antimatter for Node.js (Browsers too!)
673 stars 39 forks source link

Doesnt handle empty strings properly #26

Open pierrec opened 13 years ago

pierrec commented 13 years ago

If the data set contains an array with an empty string as the first element, it doesnt behave as expected.

This is due to the way weld detects arrays (cf line 198). A simple fix would be to have at line 198: } else if (value.length && typeof value[0] !== 'undefined') {

instead of } else if (value.length && value[0]) {