File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " gitea-react-toolkit" ,
3- "version" : " 1.11.1-rc.1 " ,
3+ "version" : " 2.0.0 " ,
44 "license" : " MIT" ,
55 "description" : " A Gitea API React Toolkit Component Library" ,
66 "homepage" : " https://gitea-react-toolkit.netlify.com/" ,
Original file line number Diff line number Diff line change @@ -37,10 +37,11 @@ function useFile({
3737 const branch = repository && ( repository . branch || repository . default_branch ) ;
3838 const [ deleted , setDeleted ] = useState ( ) ;
3939
40- const _setBlob = useCallback ( ( _blob ) => {
41- if ( blob && _blob && onConfirmClose ) {
42- if ( onConfirmClose ( ) )
43- {
40+ const _setBlob = useCallback ( async ( _blob ) => {
41+ if ( blob && _blob && typeof onConfirmClose == 'function' ) {
42+ const confirm = await onConfirmClose ( )
43+
44+ if ( confirm ) {
4445 setBlob ( _blob ) ;
4546 }
4647 } else {
You can’t perform that action at this time.
0 commit comments