Skip to content

Commit

Permalink
Merge pull request #353 from nlnwa/fix-comma-regression
Browse files Browse the repository at this point in the history
Fix formatting after removing seeds in name list
  • Loading branch information
maeb authored Aug 3, 2022
2 parents 472e42c + 3a899e8 commit e084a3c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class SeedMetaComponent extends MetaComponent implements AsyncValidator {
if (found > -1) {
urls.splice(found, 1);
}
value = urls.toString();
value = urls.join('\n');
this.name.setValue(value);
}
if (!value) {
Expand All @@ -111,7 +111,7 @@ export class SeedMetaComponent extends MetaComponent implements AsyncValidator {
}

onRemoveExistingUrls(seeds: ConfigObject[]) {
const urls = this.name.value.trim().split(/\s+/);
const urls: string[] = this.name.value.trim().split(/\s+/);
for (const seed of seeds) {
const url = new URL(seed.meta.name);
const domain = url.hostname.replace('www.', '');
Expand All @@ -121,7 +121,7 @@ export class SeedMetaComponent extends MetaComponent implements AsyncValidator {
urls.splice(found, 1);
}
}
const value = urls.toString();
const value: string = urls.join('\n');
this.name.setValue(value);

if (!value) {
Expand Down

0 comments on commit e084a3c

Please sign in to comment.