From fae37c476b9a30f0220b2d3e4eebe291a6e52eab Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Thu, 21 Jul 2022 18:47:34 -0500 Subject: [PATCH] Add context to FileBlob --- helpers/scanner/client.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/helpers/scanner/client.js b/helpers/scanner/client.js index 2138cad..ea82066 100644 --- a/helpers/scanner/client.js +++ b/helpers/scanner/client.js @@ -118,7 +118,10 @@ export class AppScan { return new Promise( async ( resolve, reject ) => { // Check if file is a Blob, typically in the Browser // otherwise convert it to a Blob, like in Node - const FileBlob = FileInstance instanceof Blob ? FileInstance : new bufferApi.Blob( FileInstance.arrayBuffer ) + // Both Browser and Node have Blob + // Node/Our File Polyfill references .arrayBuffer as a property + // Browser currently references .arrayBuffer as an async method + const FileBlob = FileInstance instanceof Blob ? FileInstance : new Blob( FileInstance.arrayBuffer ) // console.log( 'FileBlob', FileBlob )