Write tests and simplify logic
This commit is contained in:
@ -12,7 +12,7 @@ export const findRunElementIndexWithToken = (paragraphElement: Element, token: s
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((text.elements?.[0].text as string)?.includes(token)) {
|
||||
if ((text.elements[0].text as string)?.includes(token)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user