catching undefined errors on url

This commit is contained in:
WolverinDEV 2019-01-24 20:38:33 +01:00
parent 9a8ce332d7
commit c5e7029c81

View file

@ -163,6 +163,7 @@ namespace htmltags {
XBBCODE.addTags({
function: {
openTag: (params, content) => {
if(params) {
if(params.match(url_channel_regex)) {
const groups = url_channel_regex.exec(params);
@ -181,14 +182,16 @@ namespace htmltags {
client_name: decodeURIComponent(groups[3])
});
}
}
return origin_url.openTag(params, content);
},
closeTag: (params, content) => {
if(params) {
if(params.match(url_client_regex))
return "</div>";
if(params.match(url_channel_regex))
return "</div>";
}
return origin_url.closeTag(params, content);
}
},