Skip to content

Commit

Permalink
refactor(login): small refactorings
Browse files Browse the repository at this point in the history
  • Loading branch information
tadayosi committed Apr 22, 2024
1 parent 4c1e92c commit 741ff22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/hawtio/src/ui/login/HawtioLoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const HawtioLoginForm: React.FunctionComponent = () => {
const [loginFailedMessage, setLoginFailedMessage] = useState('')
const [isEnabled, setIsEnabled] = useState(true)

log.debug(`Login state: username = ${username}, isLogin = ${isLogin}`)
log.debug('Login state: username =', username, 'isLogin =', isLogin)

const reset = () => {
setIsValidUsername(true)
Expand Down
2 changes: 1 addition & 1 deletion packages/hawtio/src/ui/login/login-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class LoginService implements ILoginService {
if (!login) {
return ''
}
return JSON.parse(login).username || ''
return JSON.parse(login).username ?? ''
}

rememberUser(username: string) {
Expand Down

0 comments on commit 741ff22

Please sign in to comment.