-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed bug with "Loading..." message when SSH key is empty. #519
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise LGTM, verified
@@ -10,8 +10,12 @@ function* saveSSHKey (sagas, action) { | |||
function* getSSHKey (sagas, action) { | |||
yield put(setUnloaded()) | |||
const result = yield sagas.callExternalAction('getSSHKey', Api.getSSHKey, action) | |||
if (!result.error && result.ssh_public_key && result.ssh_public_key.length > 0) { | |||
yield put(setSSHKey(Api.SSHKeyToInternal({ sshKey: result.ssh_public_key[0] }))) | |||
if (!result.error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we please use "return fast" approach.
if (result.error) {
return
}
// ...
I believe it improves readability, and it certainly saves my mind stack.
Bug: If there is no SSH key saved for user, then in OptionDialog "Loading..." message doesn't disappear Fixes: oVirt#505
@jniederm Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, verified
Bug: If there is no SSH key saved for user, then in OptionDialog "Loading..." message doesn't disappear
Fixes: #505
This change is