jennschiffer / timbles.js

a very simple jQuery plugin for tables, made by the person who literally did not invent tables
MIT License
38 stars 4 forks source link

Timbles ignores data-value attribute when value is falsy #13

Closed edelooff closed 8 years ago

edelooff commented 8 years ago

Working with some data sets where the data-value was very different from the textual content of the cell, I noticed that timbles in some cases ignores the explicitly provided data-value attribute in favor of text content.

This happens whenever the value of this is considered boolean false (due to the dataValue || cell.textContent || cell.innerText statement). This also happens for a zero value, as this is first converted to integer by code run just above it.