diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-01-30 12:48:51 +0200 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-01-30 12:48:51 +0200 |
| commit | a8cc808396a24f0a5e4262d07e3edae1a4e5fc1d (patch) | |
| tree | 62985d87f95c60ff6aa493b9209d358ff695db65 /src | |
| parent | 1cf7f72b1b8c4d0c353fd7989de0c44d11009b8c (diff) | |
| download | DevHive-a8cc808396a24f0a5e4262d07e3edae1a4e5fc1d.tar DevHive-a8cc808396a24f0a5e4262d07e3edae1a4e5fc1d.tar.gz DevHive-a8cc808396a24f0a5e4262d07e3edae1a4e5fc1d.zip | |
Editing user languages and technologies supports having multiple spaces anywhere in input
Diffstat (limited to 'src')
| -rw-r--r-- | src/DevHive.Angular/src/app/components/profile-settings/profile-settings.component.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/DevHive.Angular/src/app/components/profile-settings/profile-settings.component.ts b/src/DevHive.Angular/src/app/components/profile-settings/profile-settings.component.ts index 5be160e..1f17fe1 100644 --- a/src/DevHive.Angular/src/app/components/profile-settings/profile-settings.component.ts +++ b/src/DevHive.Angular/src/app/components/profile-settings/profile-settings.component.ts @@ -185,7 +185,9 @@ export class ProfileSettingsComponent implements OnInit { // Transfer user input to objects of type { "name": "value" } const actualLanguages = []; for (const lName of names) { - actualLanguages.push({ name : lName }); + if (lName !== '') { + actualLanguages.push({ name : lName }); + } } // Add the data to the form (to the value that is going to be sent) @@ -211,7 +213,9 @@ export class ProfileSettingsComponent implements OnInit { // Transfer user input to objects of type { "name": "value" } const actualTechnologies = []; for (const tName of names) { - actualTechnologies.push({ name : tName }); + if (tName !== '') { + actualTechnologies.push({ name : tName }); + } } // Add the data to the form (to the value that is going to be sent) |
