jfoclpf commented on issue #1293:
URL: https://github.com/apache/cordova-ios/issues/1293#issuecomment-1448384498

   Thank you very much @breautek 
   
   > If it's erroring at the `FileReader` level, you may not be seeing the 
result because you're only hooking the `onerror` callback after the `readAs*` 
call.
   
   Should I then declare the `reader.onerror` before the `readAs*` call? 
Interesting, I will do it
   
   
   > I don't think it's related, but you resolve during `onloadend` but also 
reject in `onerror`. This is a problem because on error, both will be called 
and you are going to try to resolve or reject a a promise that already has an 
resolution. Instead of `onloadend`, you can use `onload` instead which will 
only fire on successful, which should guarantee that you resolve/reject the 
promise only once.
   
   Thank you very much, it makes sense, I will amend `onloadend` to `onload`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to