Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

changed to handle 404 during download, also removing progress listene… #42

Merged
merged 1 commit into from
Jun 2, 2017

Conversation

abhinadduri
Copy link
Collaborator

…r once percent completion is 100 to avoid manipulating DOM twice

…r once percent completion is 100 to avoid manipulating DOM twice
@dannycoates dannycoates merged commit 1194b93 into master Jun 2, 2017
@@ -20,6 +20,11 @@ class FileReceiver extends EventEmitter {
};

xhr.onload = function(e) {

if (xhr.status === 404) {
reject(new Error('The file has expired, or has already been deleted.'));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need a return statement to prevent leaking into the code path(s) below?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, good catch @pdehaan

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added the return

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants