File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export const App = () => {
2222 const [ isPublicCodeImported , setPublicCodeImported ] = useState ( false ) ;
2323 const [ warnings , setWarnings ] = useState < Warning [ ] > ( [ ] ) ;
2424 const [ data , setData ] = useState <
25- PublicCode | PublicCodeWithDeprecatedFields
25+ PublicCode | PublicCodeWithDeprecatedFields | undefined
2626 > ( ) ;
2727 const { t } = useTranslation ( ) ;
2828
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ const defaultValues = {
122122} ;
123123
124124type EditorProps = {
125- setData : ( data : PublicCode ) => void ;
125+ setData : ( data : PublicCode | undefined ) => void ;
126126 setWarnings : ( items : Warning [ ] ) => void ;
127127 isPublicCodeImported : boolean ;
128128 setPublicCodeImported : ( value : boolean ) => void ;
@@ -275,6 +275,7 @@ export default function Editor({
275275 ) ;
276276
277277 const resetFormHandler = ( ) => {
278+ setData ( undefined ) ;
278279 dispatch ( resetPubliccodeYmlLanguages ( ) ) ;
279280 reset ( { ...defaultValues } ) ;
280281 checkPubliccodeYmlVersion ( getValues ( ) as PublicCode ) ;
You can’t perform that action at this time.
0 commit comments