Closed ChristophGr closed 11 years ago
Quick suggestion for a fix:
return IDBKeyRange.bound(r[0], r[1], r.length>2 ? r[2] : true, r.length>3 ? r[3] : true);
This could be a problem if r = [1,2, undefined, false] - not sure why a user would do that though :full_moon_with_face:
So changing it to actually checking if the value is undefined, and assigning the default value. [Ashamed that I Wrote this code :( ]
You use this snippet: return IDBKeyRange.bound(r[0], r[1], r[2] || true, r[3] || true);
when specifying a range [1, 5, false, false] the expressions evaluate to true and the range will end up excluding the bounds.
Also I think the default should including bounds (as in indexedDB-API).