Skip to content

Commit

Permalink
fix(dataTransfer): ignore unexpected DataTransferCompleteCommands
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Van Camp committed Sep 11, 2018
1 parent 666cff5 commit 1f97a4a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dataTransfer/dataTransferFrame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ export default class DataTransferFrame extends DataTransfer {
}
this.queueCommand(command.properties.chunkCount, command.properties.chunkSize)
} else if (command.constructor.name === Commands.DataTransferCompleteCommand.name) {
this.state = Enums.TransferState.Finished
if (this.state === Enums.TransferState.Transferring) {
this.state = Enums.TransferState.Finished
}
}
}

Expand Down

0 comments on commit 1f97a4a

Please sign in to comment.