refactor(html): prepare for noUncheckedIndexedAccess (#4297)

This commit is contained in:
Gabriele Belluardo 2024-02-12 04:12:28 +01:00 committed by GitHub
parent 94d9e5b6fd
commit 34921103e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,7 +93,7 @@ export function unescape(
}
return str
.replaceAll(entityRe, (m) => entityList[m])
.replaceAll(entityRe, (m) => entityList[m]!)
.replaceAll(RX_DEC_ENTITY, (_, dec) => codePointStrToChar(dec, 10))
.replaceAll(RX_HEX_ENTITY, (_, hex) => codePointStrToChar(hex, 16));
}