Search backend: fix issues with null and zero-length offsetAndLength
There are no commits yet
Push commits to the source branch or add previously merged commits to review them.
Created by: camdencheek
The code that converts ChunkMatch into []LineMatch treats zero-length matches as valid, which they are. However, it's not expected that a LineMatch has zero-length or nil offsetAndLengths. To maintain backwards compatibility, I've udpated the conversion function to stop generating line matches like this.
Added a test case for this. Also tested manually that it fixed the browser crash from null offsetAndLength.
Push commits to the source branch or add previously merged commits to review them.