Tab Removal & Check Abstraction

Per Jessop's request: https://github.com/lbryio/spee.ch/pull/1011#pullrequestreview-243975520
Corrected tabs and added the clarified abstraction to the request state check.
This commit is contained in:
ProfessorDey 2019-05-31 00:15:27 +01:00 committed by GitHub
parent 82ab3b47b1
commit 8a6cd2db13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,7 +22,7 @@ export const makePublishRequestChannel = (fd, isUpdate) => {
xhr.upload.addEventListener('load', onLoad);
// set state change handler
xhr.onreadystatechange = () => {
if (xhr.readyState === 4) {
if (xhr.readyState === XMLHttpRequest.DONE) {
switch (xhr.status) {
case 413:
emitter({error: new Error("Unfortunately it appears this web server " +