during answering on one question I found the bug in the line of code
(and this one too
later in the code). The problem one have if ccur[idn] (or ccur2[idn]) is 0 (the id of the row is numeric 0). In the case it will be used idr instead of ccur[idn] (or ccur2[idn]) which can follow to id dupplicates.
To fix the problem one should test for ccur[idn] !== undefined instead of usage || operation. Additionally one can change the first test ccur !== undefined to ccur != null, to be sure that ccur is neither undefined nor null before usage of ccur[idn].
By the way to reproduce the proglem one can add key: true to some colum and use standard format where cell array is defined in JSON input data. For example
In the case idn will be set to 0 (index of the first column which has key:true property). The line
will returns always undefined value and we will fall down in the case which I descrined above.
Most Users Ever Online: 215
Currently Browsing this Page:
Guest Posters: 447
Newest Members: Krishna, adamf, klimats, JAZR, jterlouw951, stevetriand
Moderators: tony (7620), Rumen[Trirand] (81)
Administrators: admin (61)