Skip to content

Commit

Permalink
file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushKun committed Sep 20, 2024
1 parent 2a1d115 commit 957007f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions next_app/src/components/menubar/components/new-file.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export default function NewFile() {
console.log(reader.result)
// add new file to project
const proj = manager.getProject(globalState.activeProject);
if (proj.files[file.name]) return toast.error("File already exists")
const f = manager.newFile(proj, {
name: file.name,
type: file.name.endsWith(".luanb") ? "NOTEBOOK" : "NORMAL",
Expand Down

0 comments on commit 957007f

Please sign in to comment.