fix: usecases page crash due to oauth2-app auth type

This commit is contained in:
monilprajapati
2024-11-23 18:57:00 +05:30
parent 60509dcd18
commit 08463aa553
@@ -324,7 +324,7 @@ const ConfigureWorkflow = (props) => {
} }
} }
if (app.authentication.type === "oauth2" || app.authentication.type === "oauth2-app") { if (app?.authentication?.type === "oauth2" || app?.authentication?.type === "oauth2-app") {
filled = false filled = false
action.auth_type = "oauth2" action.auth_type = "oauth2"
@@ -848,7 +848,7 @@ const ConfigureWorkflow = (props) => {
{opened ? {opened ?
<div style={{padding: 12, }}> <div style={{padding: 12, }}>
{action.app.authentication.type === "oauth2-app" || action.app.authentication.type === "oauth2" || action.auth_type === "oauth2" ? {action.app?.authentication?.type === "oauth2-app" || action.app?.authentication?.type === "oauth2" || action.auth_type === "oauth2" ?
<div> <div>
<AuthenticationOauth2 <AuthenticationOauth2
selectedApp={action.app} selectedApp={action.app}
@@ -945,7 +945,7 @@ const ConfigureWorkflow = (props) => {
) )
})} })}
{action.app.authentication.type !== "oauth2-app" && action.app.authentication.type !== "oauth2" ? {action.app?.authentication?.type !== "oauth2-app" && action.app?.authentication?.type !== "oauth2" ?
<Button <Button
variant="contained" variant="contained"
color="primary" color="primary"