Open davidstosik opened 4 years ago
Sorry for the delay, this is rebased now. 👌
This still seems to be a problem, so I rebased my branch.
Darn. this is still outstanding. After we merge #268 I'd like to get this in. Please ping me if I haven't gotten this in by 5/15/2023
Here's the simplest way to reproduce the error:
In some scenarios,
@records
can benil
when checking itslength
and appending a new record.This PR adds a test case that reproduces the error above, and fixes it.
My first approach was to simply replace
@records = nil
with@records = []
, but then I figured out I could do better and improve the code base a bit, avoiding in the process duplication of code such as@records || []
.All specs still pass.
Please let me know what you think.