Undefined check for unsafes
This commit is contained in:
parent
aa4877d851
commit
9bddcaa181
|
@ -1134,6 +1134,7 @@ PublicServers.prototype.joinServer = function (code) {
|
||||||
};
|
};
|
||||||
|
|
||||||
PublicServers.prototype.escape = function(unsafe) {
|
PublicServers.prototype.escape = function(unsafe) {
|
||||||
|
if(unsafe === undefined) return "";
|
||||||
return unsafe
|
return unsafe
|
||||||
.replace(/&/g, "&")
|
.replace(/&/g, "&")
|
||||||
.replace(/</g, "<")
|
.replace(/</g, "<")
|
||||||
|
|
|
@ -1134,6 +1134,7 @@ PublicServers.prototype.joinServer = function (code) {
|
||||||
};
|
};
|
||||||
|
|
||||||
PublicServers.prototype.escape = function(unsafe) {
|
PublicServers.prototype.escape = function(unsafe) {
|
||||||
|
if(unsafe === undefined) return "";
|
||||||
return unsafe
|
return unsafe
|
||||||
.replace(/&/g, "&")
|
.replace(/&/g, "&")
|
||||||
.replace(/</g, "<")
|
.replace(/</g, "<")
|
||||||
|
|
Loading…
Reference in New Issue