Skip to content

Commit 2d55175

Browse files
committed
reset isGenerated on save
1 parent e4def04 commit 2d55175

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/compass-schema-validation/src/modules/rules-generation.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,16 @@ export const rulesGenerationReducer: Reducer<RulesGenerationState, Action> = (
136136
};
137137
}
138138

139+
if (
140+
isAction(action, ValidationActions.ValidationSaveEnded) &&
141+
state.isGenerated
142+
) {
143+
return {
144+
...state,
145+
isGenerated: false, // the generated validator has been saved
146+
};
147+
}
148+
139149
if (
140150
isAction<RulesGenerationErrorCleared>(
141151
action,

0 commit comments

Comments
 (0)