Javascript - TypeError: x is not a function at done
Javascript - TypeError: x is not a function at done I am building my own browserside javascript sdk, using webpack and node. I have built a async/await document function, which simply submits a document to an api. This function could be called twice in the browser (if there is a second image) However on the second document function call i get the following error. TypeError: hsp.document is not a function at done index.html <script> hsp = new HSP(); // function called on button click async function done() { try { const doc = await hsp.document(transaction, token, url, this.frontBase64); console.log(doc); // If second image, submit it also. if(this.backBase64) { const doc = await hsp.document(transaction, token, url, this.backBase64); } } catch (er) { console.log(er); } } </script> sdk.js async document(transaction, token, url, doc) { try { this.document = await this.api.submit...