Gebruiker:Xxmarijnw/ipv6rangefinder.js: verschil tussen versies

Fix TypeError: can't access property "test", match is undefined
(Fix TypeError: can't access property "test", match is undefined)
 
match = new RegExp("^[a-zA-Z0-9]{1,4}:[a-zA-Z0-9]{1,4}:[a-zA-Z0-9]{1,4}:[a-zA-Z0-9]{1,4}(?=:)");
match48 = new RegExp("^[a-zA-Z0-9]{1,4}:[a-zA-Z0-9]{1,4}:[a-zA-Z0-9]{1,4}(?=:)");
} else if (namespace === -1) {
}
 
if (namespace === -1) {
match = new RegExp("(?<=/)[a-zA-Z0-9]{1,4}:[a-zA-Z0-9]{1,4}:[a-zA-Z0-9]{1,4}:[a-zA-Z0-9]{1,4}(?=:)");
match48 = new RegExp("(?<=/)[a-zA-Z0-9]{1,4}:[a-zA-Z0-9]{1,4}:[a-zA-Z0-9]{1,4}(?=:)");
}
if (match !== undefined && match.test(title)) {
let range = match.exec(title) + ":0:0:0:0/64";
let range48 = match48.exec(title) + ":0:0:0:0:0/48";