Explorar el Código

fix: do not reject empty responses

Gerald hace 9 años
padre
commit
e3650ce3e1
Se han modificado 3 ficheros con 3 adiciones y 3 borrados
  1. 1 1
      src/background/sync/index.js
  2. 1 1
      src/background/sync/onedrive.js
  3. 1 1
      src/manifest.json

+ 1 - 1
src/background/sync/index.js

@@ -308,7 +308,7 @@ var sync = function () {
           }
           xhr.timeout = 10 * 1000;
           xhr.onload = function () {
-            if (!this.status || this.status > 300 || !this.responseText)
+            if (!this.status || this.status > 300)
               reject(this);
             else
               resolve(this.responseText);

+ 1 - 1
src/background/sync/onedrive.js

@@ -168,7 +168,7 @@ setTimeout(function () {
       return this.request({
         method: 'DELETE',
         url: '/drive/special/approot:/' + encodeURIComponent(path),
-      });
+      }).catch(_.noop);
     },
     authenticate: authenticate,
     checkAuthenticate: checkAuthenticate,

+ 1 - 1
src/manifest.json

@@ -3,7 +3,7 @@
   "version": "__VERSION__",
   "manifest_version": 2,
   "description": "__MSG_extDescription__",
-  "developer": {
+  "author": {
     "name": "Gerald",
     "url": "http://gerald.top"
   },