fix early-return logic when finished sending data

This commit is contained in:
xenofem 2022-04-27 13:03:35 -04:00
parent b0382ff649
commit f94450c1a2

View file

@ -27,6 +27,7 @@ function finishSending() {
function sendData() { function sendData() {
if (fileIndex >= files.length) { if (fileIndex >= files.length) {
finishSending(); finishSending();
return;
} }
const currentFile = files[fileIndex]; const currentFile = files[fileIndex];
if (byteIndex < currentFile.size) { if (byteIndex < currentFile.size) {