alfajango / jquery-dynatable

A more-fun, semantic, alternative to datatables
http://www.dynatable.com
Other
2.77k stars 363 forks source link

Delete undefined key triggers error #244

Open swedmike opened 8 years ago

swedmike commented 8 years ago

Running a delete on urlOptions[label][attr] at line 1559 triggers an undefined error if the label is not there, which will stop JS execution and thus show the processindicator forever, making the table unusable.

The fix is obviously a small check:

if ("label" in urlOptions && "attr" in urlOptions[label]) {
  delete urlOptions[label][attr];
}