File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -67,20 +67,17 @@ const CollectionMenu = ({
67
67
68
68
const existingFolders = useExplorerStore . getState ( ) . explorer . folders ;
69
69
const parentFolderId = folderId || collectionId ;
70
- // console.log(parentFolderId, "parentfolderid")
71
70
const isDuplicateName = existingFolders . some (
72
- ( folder ) =>
73
- // console.log(`folder name ${folder.name} and folder parent id ${folder.__ref.collectionId}`),
74
-
71
+ ( folder ) =>
75
72
folder . name === val && folder . __ref . collectionId === parentFolderId
76
- ) ;
73
+ ) ;
77
74
78
- if ( isDuplicateName ) {
79
- return {
80
- isValid : false ,
81
- message : 'A folder with the same name already exists in this location.' ,
82
- } ;
83
- }
75
+ if ( isDuplicateName ) {
76
+ return {
77
+ isValid : false ,
78
+ message : 'A folder with the same name already exists in this location.' ,
79
+ } ;
80
+ }
84
81
return {
85
82
isValid,
86
83
message :
You can’t perform that action at this time.
0 commit comments