Skip to content

Commit

Permalink
Merge pull request #32 from meet-aniket/#20jwqu1
Browse files Browse the repository at this point in the history
Improved: code to fix login error when having spaces in the fields (#20jwqu1).
  • Loading branch information
adityasharma7 authored Apr 6, 2022
2 parents b28ce45 + 412e4cf commit 687207b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions changelogs/unreleased/-20jwqu1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: 'Improved: code to remove login error when having spaces in the fields.'
ticket_id: "#20jwqu1"
merge_request: 32
author: Aniket Kumar Pandey
type: fixed
4 changes: 2 additions & 2 deletions src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ export default defineComponent({
},
methods: {
login: function () {
this.store.dispatch("user/setUserInstanceUrl", this.instanceUrl)
this.store.dispatch("user/setUserInstanceUrl", this.instanceUrl.trim())
const { username, password } = this;
this.store.dispatch("user/login", { username, password }).then((data: any) => {
this.store.dispatch("user/login", { username: username.trim(), password }).then((data: any) => {
if (data.token) {
this.username = ''
this.password = ''
Expand Down

0 comments on commit 687207b

Please sign in to comment.