This commit is contained in:
calzoneman 2015-07-12 22:25:55 -07:00
parent b8794e2cf3
commit 45c4e650ee
1 changed files with 9 additions and 7 deletions

View File

@ -96,11 +96,12 @@ MediaRefresherModule.prototype.refreshGoogleDocs = function (media, cb) {
return;
}
if (typeof err !== "string") err = "unknown";
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");
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";
err = err.replace(/Forbidden/, "Access Denied");
if (typeof err === "string") {
err = err.replace(/Forbidden/, "Access Denied");
}
switch (err) {
case "Access Denied":