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

Kc 2129 resize observer loop with unresolved notifications bugsnag #36

Conversation

JoseToitio
Copy link
Contributor

No description provided.

@@ -161,11 +159,11 @@ export const AccountDetailsModal: React.FC<IAccountDetailsModal> = ({
try {
const storagePrimaryAssets = localStorage.getItem('primaryAsset');
if (storagePrimaryAssets) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use guard clause to improve the conditional flow
https://deviq.com/design-patterns/guard-clause

const newPrimaryAsset = otherAssets.filter(
asset => asset.assetId === getPrimaryAsset.assetId,
);
if (newPrimaryAsset) {
if (newPrimaryAsset[0]) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too

@Doug-Fernando Doug-Fernando merged commit c8202e5 into develop Nov 8, 2023
3 checks passed
@Doug-Fernando Doug-Fernando deleted the KC-2129-resize-observer-loop-with-unresolved-notifications-bugsnag branch November 8, 2023 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants