fix(ui): Fix crash when viewing an invalid certificate (#43681)
* fix: remove empty object literal creation causing #43224 * fix: initialize userByName selector using empty object from initialState to keep the same reference instead * fix(lang): added translation for invalid certificate
This commit is contained in:
@@ -229,8 +229,9 @@ export const shouldRequestDonationSelector = state => {
|
||||
|
||||
export const userByNameSelector = username => state => {
|
||||
const { user } = state[ns];
|
||||
// TODO: Why return a string or empty objet literal?
|
||||
return username in user ? user[username] : {};
|
||||
// return initial state empty user empty object instead of empty
|
||||
// object litteral to prevent components from re-rendering unnecessarily
|
||||
return user[username] ?? initialState.user;
|
||||
};
|
||||
|
||||
export const certificatesByNameSelector = username => state => {
|
||||
|
Reference in New Issue
Block a user