Skip to content
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

fix: Reflect empty team image update #3900

Merged
merged 1 commit into from
May 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions electron/renderer/src/reducers/accountReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ export default (state = [createAccount()], action) => {
if (account.webappUrl && !action.data.webappUrl) {
delete action.data.webappUrl;
}
// Note: If the current account has a picture but the update does not
// we remove the picture.
if (account.picture && !action.data.picture) {
delete account.picture;
}
return isMatchingAccount ? {...account, ...action.data, isAdding: false, ssoCode: undefined} : account;
});
}
Expand Down
2 changes: 1 addition & 1 deletion electron/src/renderer/preload-webview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import * as EnvironmentUtil from '../runtime/EnvironmentUtil';
interface TeamAccountInfo {
accentID: string;
name: string;
picture: string;
picture?: string;
teamID?: string;
teamRole: string;
userID: string;
Expand Down