-
Notifications
You must be signed in to change notification settings - Fork 54
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: sentry issues #1844
base: main
Are you sure you want to change the base?
fix: sentry issues #1844
Conversation
Quality Gate passedIssues Measures |
@@ -1194,7 +1194,10 @@ export const getDeploymentAppType = ( | |||
return allowedDeploymentTypes[0] | |||
} | |||
|
|||
export const hasApproverAccess = (email: string, approverList: string[]): boolean => { | |||
export const hasApproverAccess = (email: string = '', approverList: string[]= []): boolean => {// added null check for email and approverList |
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 remove equating to '' since already checking in first if block. And can remove this comment since it is clear from the if block.
console.log(`Service Worker at: ${swUrl}`); | ||
if (r) { | ||
setInterval(async () => { | ||
if (!r.installing && navigator) { |
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.
Why have we reversed the if condition, earlier we were exiting from block in case of truthy now we are nesting the conditions inside this block.
setGroupFilterOptions(_groupFilterOption); | ||
} | ||
} catch (error) { | ||
console.error('Error fetching environment group list:', 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.
We can import showError and use it to show error in toast by calling showError(error)
@@ -539,6 +539,7 @@ export const Details: React.FC<DetailsType> = ({ | |||
}, [isPollingRequired]) | |||
|
|||
async function handleHibernate(e) { | |||
|
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.
Please revert this extra line
@@ -306,7 +306,7 @@ export default function AppOverview({ appMetaInfo, getAppMetaInfoRes, filteredEn | |||
{createdBy} | |||
</div> | |||
</div> | |||
{appType === 'app' && gitMaterials.length > 0 && ( | |||
{appType === 'app' && gitMaterials && gitMaterials.length > 0 && ( |
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 write as gitMaterials?.length > 0
const _groupedData = groupDataByType(result); | ||
setGroupedOptionsDataOverride(_groupedData); | ||
} catch (error) { | ||
console.error('Error fetching options:', 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.
Please use showError instead of console.error
Description
This PR includes changes to:
Fixes # (issue)
Type of change
Checklist: