Fix: replace deprecated String.prototype.substr with slice (#23915)
Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com> Co-authored-by: Yongtao Huang <99629139+hyongtao-db@users.noreply.github.com>
This commit is contained in:
parent
c39dfad7b6
commit
2476511368
3 changed files with 3 additions and 3 deletions
|
|
@ -259,7 +259,7 @@ function getFullMatchOffset(
|
|||
): number {
|
||||
let triggerOffset = offset
|
||||
for (let i = triggerOffset; i <= entryText.length; i++) {
|
||||
if (documentText.substr(-i) === entryText.substr(0, i))
|
||||
if (documentText.slice(-i) === entryText.slice(0, i))
|
||||
triggerOffset = i
|
||||
}
|
||||
return triggerOffset
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue