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