This commit is contained in:
calzoneman 2015-07-12 22:25:55 -07:00
parent b8794e2cf3
commit 45c4e650ee

View file

@ -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":