diff --git a/node_modules/c9/urls.js b/node_modules/c9/urls.js index e1e9362c..7484194b 100644 --- a/node_modules/c9/urls.js +++ b/node_modules/c9/urls.js @@ -34,7 +34,8 @@ plugin.getBaseUrl = function(req, sourceBaseUrlPattern, targetBaseUrlPattern) { || req.host || req.url && req.url.replace(/^https?:\/\/([^/]*).*/, "$1") || req; - assert(typeof sourceHost === "string", "Not a valid request object: " + JSON.stringify(req)); + if (typeof sourceHost !== "string") + throw new Error("Not a valid request object: " + req); var sourceHostMatcher = sourceBaseUrlPattern .replace(/^https?:\/\//, "")