Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
6a6815da
Commit
6a6815da
authored
Oct 14, 2021
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure callback is provided before calling callback
parent
91dccf8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
workspace.ts
libs/remix-ui/workspace/src/lib/actions/workspace.ts
+3
-3
No files found.
libs/remix-ui/workspace/src/lib/actions/workspace.ts
View file @
6a6815da
...
@@ -26,7 +26,7 @@ export const addInputField = async (type: 'file' | 'folder', path: string, cb?:
...
@@ -26,7 +26,7 @@ export const addInputField = async (type: 'file' | 'folder', path: string, cb?:
return
reject
(
error
)
return
reject
(
error
)
}
}
cb
(
null
,
true
)
cb
&&
cb
(
null
,
true
)
resolve
(
fileTree
)
resolve
(
fileTree
)
})
})
})
})
...
@@ -237,7 +237,7 @@ export const uploadFile = async (target, targetFolder: string, cb?: (err: Error,
...
@@ -237,7 +237,7 @@ export const uploadFile = async (target, targetFolder: string, cb?: (err: Error,
}
}
}
}
fileReader
.
readAsText
(
file
)
fileReader
.
readAsText
(
file
)
cb
(
null
,
true
)
cb
&&
cb
(
null
,
true
)
}
}
const
name
=
`
${
targetFolder
}
/
${
file
.
name
}
`
const
name
=
`
${
targetFolder
}
/
${
file
.
name
}
`
...
@@ -250,7 +250,7 @@ export const uploadFile = async (target, targetFolder: string, cb?: (err: Error,
...
@@ -250,7 +250,7 @@ export const uploadFile = async (target, targetFolder: string, cb?: (err: Error,
},
()
=>
{}))
},
()
=>
{}))
}
}
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
cb
(
error
)
cb
&&
cb
(
error
)
if
(
error
)
console
.
log
(
error
)
if
(
error
)
console
.
log
(
error
)
})
})
})
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment