Content of UInt8Array changed by returning it from function

Completely, utterly baffled by this. async function a(): {Promise<{ b: Uint8Array; mediaType: string; } { // .... const result = { b: resizedImage, mediaType: image.mediaType }; return result; // Putting a breakpoint at the result, the content of Uint8Array b starts with [82, 73, 70, ..] async function b() { // .... const result = await a(); console.log(result); // Now, after the return, the content of "result.b" starts with [16, 227, 103, ..] The only code that has been executed was the "return" line, yet the array changed. How is this possible? The array does stay the same size.
No description
No description
1 Reply
bartlomieju
bartlomieju2w ago
What's the content of the function