When upgrade to 1.10.0: TypeError: Cannot use 'in' operator to search for '44' in
When upgrade to 1.10.0: TypeError: Cannot use 'in' operator to search for '44' in
Jason.Bie
Posts: 2Questions: 1Answers: 0
Every thing is ok when we use 1.9.4, we got this error after upgrade dataTables from version 1.9.4 to 1.10.0, jquery upgrade from 1.10.3 to 1.11.0. The strange thing is when we remove the <thead> from the html, it works.
The error stack as below:
TypeError: Cannot use 'in' operator to search for '44' in
Column Header A
at s (http://localhost/Content/assets/plugins/jquery-1.11.0.min.js:2:4436)
at Function.n.extend.each (http://localhost/Content/assets/plugins/jquery-1.11.0.min.js:2:2824)
at _fnCamelToHungarian (http://localhost/Content/assets/plugins/datatables/media/js/jquery.dataTables.js:343:5)
at _fnColumnOptions (http://localhost/Content/assets/plugins/datatables/media/js/jquery.dataTables.js:607:4)
at http://localhost/Content/assets/plugins/datatables/media/js/jquery.dataTables.js:6142:5
at _fnApplyColumnDefs (http://localhost/Content/assets/plugins/datatables/media/js/jquery.dataTables.js:926:5)
at HTMLTableElement.<anonymous> (http://localhost/Content/assets/plugins/datatables/media/js/jquery.dataTables.js:6141:4)
at Function.n.extend.each (http://localhost/Content/assets/plugins/jquery-1.11.0.min.js:2:2969)
at n.fn.n.each (http://localhost/Content/assets/plugins/jquery-1.11.0.min.js:2:845)
at DataTable (http://localhost/Content/assets/plugins/datatables/media/js/jquery.dataTables.js:5838:8)
Our html is:
<thead>
<tr role="row">
<th role="columnheader" tabindex="-1" aria-controls="AccountingTable" rowspan="1" colspan="1">
Column Header A
</th>
<th role="columnheader" tabindex="-1" aria-controls="AccountingTable" rowspan="1" colspan="1">
Column Header B
</th>
<th role="columnheader" tabindex="-1" aria-controls="AccountingTable" rowspan="1" colspan="1">
Column Header C
</th>
<th role="columnheader" tabindex="-1" aria-controls="AccountingTable" rowspan="1" colspan="1">
Column Header D
</th>
<th role="columnheader" tabindex="-1" aria-controls="AccountingTable" rowspan="1" colspan="1">
Column Header E
</th>
<th role="columnheader" tabindex="-1" aria-controls="AccountingTable" rowspan="1" colspan="1">
Column Header F
</th>
</tr>
</thead>
Do you have any idea?
This discussion has been closed.
Answers
First I would suggest using 1.10.7 rather than 1.10.0 - 1.10.7 is the current release and fixes many bugs since 1.10.0.
Secondly, please can you link to a test case showing the issue so it can be debugged.
Allan
Hello Allan,
Thanks for your answer! Even I using 1.10.7, the bug is still there. Have you see this bug before?
We are using dataTables with angularjs and Typescript, it's not easy to split a test case.
Jason
I don't think I have seen this before. The only other thing I can suggest is that you try the 1.10.8-dev nightly from the download page. Otherwise I would need a test case to be able to debug it.
Allan