Skip to content

Commit cb6a385

Browse files
authored
Merge pull request #113 from unfoldingWord/bugfix-mannycolon-350
Changes for issue tc-create#350
2 parents 1c5f0e6 + f4382dc commit cb6a385

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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/",

src/components/file/useFile.js

+5-4
Original file line numberDiff line numberDiff 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{

0 commit comments

Comments
 (0)