Do not filter body ranges if there are none
This commit is contained in:
parent
965c635905
commit
6eba9350be
1 changed files with 4 additions and 0 deletions
|
@ -92,6 +92,10 @@ function getFilteredBodyRanges(
|
|||
body: string,
|
||||
bodyRanges: BodyRangesType
|
||||
): BodyRangesType {
|
||||
if (!bodyRanges.length) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Find where the snippet starts in the full text
|
||||
const stripped = snippet
|
||||
.replace(/<<left>>/g, '')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue