From 2d1cbcb331857e8d2d4faf386195c3806cf8211d Mon Sep 17 00:00:00 2001 From: Stephen Haberman Date: Sun, 13 Jun 2021 10:10:08 -0500 Subject: [PATCH] chore: Update codegen that slipped through. --- integration/grpc-js/google/protobuf/wrappers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration/grpc-js/google/protobuf/wrappers.ts b/integration/grpc-js/google/protobuf/wrappers.ts index 6488df1b7..21fd7a809 100644 --- a/integration/grpc-js/google/protobuf/wrappers.ts +++ b/integration/grpc-js/google/protobuf/wrappers.ts @@ -615,8 +615,8 @@ const btoa: (bin: string) => string = globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, 'binary').toString('base64')); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; - for (let i = 0; i < arr.byteLength; ++i) { - bin.push(String.fromCharCode(arr[i])); + for (const byte of arr) { + bin.push(String.fromCharCode(byte)); } return btoa(bin.join('')); }