mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-19 16:08:34 +01:00
Fix optimization path for unicodeSlice
Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
@@ -21,7 +21,7 @@ export function unicodeSlice(
|
||||
end: number
|
||||
): string {
|
||||
// Optimization: whole string fits into the range, return as is
|
||||
if (begin === 0 && end >= input.length) {
|
||||
if (begin === 0 && end >= Buffer.byteLength(input)) {
|
||||
return input;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user