Fix empty trigger on readonly + fix cache apollo on deactivation (#9912)
- On deactivation, we should not need to refresh so the workflow disappear from cmd+k https://github.com/user-attachments/assets/826fa4c6-3faa-49d1-b180-ed5d3ed187e5 - When readonly, step empty, we should not see the right drawer https://github.com/user-attachments/assets/b557ef61-da81-446d-b160-f26c4c7a5191
This commit is contained in:
@ -48,18 +48,12 @@ export const WorkflowStepDetail = ({
|
||||
stepId,
|
||||
workflowVersion,
|
||||
});
|
||||
if (!isDefined(stepDefinition)) {
|
||||
if (!isDefined(stepDefinition) || !isDefined(stepDefinition.definition)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (stepDefinition.type) {
|
||||
case 'trigger': {
|
||||
if (!isDefined(stepDefinition.definition)) {
|
||||
throw new Error(
|
||||
'Expected the trigger to be defined at this point. Ensure the trigger has been set with a default value before trying to edit it.',
|
||||
);
|
||||
}
|
||||
|
||||
switch (stepDefinition.definition.type) {
|
||||
case 'DATABASE_EVENT': {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user