File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " gitea-react-toolkit" ,
3
- "version" : " 1.11.1-rc.1 " ,
3
+ "version" : " 2.0.0 " ,
4
4
"license" : " MIT" ,
5
5
"description" : " A Gitea API React Toolkit Component Library" ,
6
6
"homepage" : " https://gitea-react-toolkit.netlify.com/" ,
Original file line number Diff line number Diff line change @@ -37,10 +37,11 @@ function useFile({
37
37
const branch = repository && ( repository . branch || repository . default_branch ) ;
38
38
const [ deleted , setDeleted ] = useState ( ) ;
39
39
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 ) {
44
45
setBlob ( _blob ) ;
45
46
}
46
47
} else {
You can’t perform that action at this time.
0 commit comments