mirror of https://github.com/calzoneman/sync.git
Fix
This commit is contained in:
parent
b8794e2cf3
commit
45c4e650ee
|
@ -96,11 +96,12 @@ MediaRefresherModule.prototype.refreshGoogleDocs = function (media, cb) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (typeof err !== "string") err = "unknown";
|
||||
if (typeof err === "string") {
|
||||
err = err.replace(/Google Drive lookup failed: /, "");
|
||||
err = err.replace(/Forbidden/, "Access Denied");
|
||||
err = err.replace(/You don't have permission to access this video\./,
|
||||
"Access Denied");
|
||||
}
|
||||
|
||||
switch (err) {
|
||||
case "Moved Temporarily":
|
||||
|
@ -160,8 +161,9 @@ MediaRefresherModule.prototype.initGooglePlus = function (media, cb) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (typeof err !== "string") err = "unknown";
|
||||
if (typeof err === "string") {
|
||||
err = err.replace(/Forbidden/, "Access Denied");
|
||||
}
|
||||
|
||||
switch (err) {
|
||||
case "Access Denied":
|
||||
|
|
Loading…
Reference in New Issue