Skip to content

Commit

Permalink
fix: Reflect empty team image update (#3900)
Browse files Browse the repository at this point in the history
  • Loading branch information
ffflorian committed May 20, 2020
1 parent 13e69df commit 07b29ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit 07b29ae

Please sign in to comment.