fix Domain.fullName
This commit is contained in:
parent
00a892ee82
commit
c6a1a45812
13
dist/smartstring.domain.js
vendored
13
dist/smartstring.domain.js
vendored
File diff suppressed because one or more lines are too long
@ -15,11 +15,17 @@ export class Domain {
|
|||||||
domainName;
|
domainName;
|
||||||
subDomain;
|
subDomain;
|
||||||
constructor(domainStringArg:string){
|
constructor(domainStringArg:string){
|
||||||
this.fullName = domainStringArg;
|
|
||||||
let regexMatches = domainRegex(domainStringArg);
|
let regexMatches = domainRegex(domainStringArg);
|
||||||
|
this.fullName = "";
|
||||||
for(let i = 1; i <= 5; i++){
|
for(let i = 1; i <= 5; i++){
|
||||||
if(regexMatches[i - 1]) {
|
if(regexMatches[i - 1]) {
|
||||||
this["level" + i.toString()] = regexMatches[i - 1]
|
let localMatch = regexMatches[i - 1]
|
||||||
|
this["level" + i.toString()] = localMatch;
|
||||||
|
if (this.fullName == ""){
|
||||||
|
this.fullName = localMatch;
|
||||||
|
} else {
|
||||||
|
this.fullName = localMatch + "." + this.fullName;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this["level" + i.toString()] = undefined;
|
this["level" + i.toString()] = undefined;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user