kopia lustrzana https://github.com/c9/core
Fix undefined.replace()
rodzic
bd76f5ab1a
commit
b232c0d1e8
|
@ -36,6 +36,8 @@ plugin.getBaseUrl = function(req, sourceBaseUrlPattern, targetBaseUrlPattern) {
|
||||||
|| req;
|
|| req;
|
||||||
if (typeof sourceHost !== "string")
|
if (typeof sourceHost !== "string")
|
||||||
throw new Error("Not a valid request object: " + req);
|
throw new Error("Not a valid request object: " + req);
|
||||||
|
if (!sourceBaseUrlPattern)
|
||||||
|
throw new Error("getBaseUrls() requires at least two arguments");
|
||||||
|
|
||||||
var sourceHostMatcher = sourceBaseUrlPattern
|
var sourceHostMatcher = sourceBaseUrlPattern
|
||||||
.replace(/^https?:\/\//, "")
|
.replace(/^https?:\/\//, "")
|
||||||
|
|
Ładowanie…
Reference in New Issue