Skip to content

Commit

Permalink
LA-1272 Fixed can create file with empty or special chars name
Browse files Browse the repository at this point in the history
  • Loading branch information
KhaledNjim authored and hoangdat committed Apr 23, 2024
1 parent 8591202 commit 17401c3
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -795,12 +795,13 @@ class SharedSpaceDocumentNodeViewModel extends BaseViewModel {
}

String? _getErrorString(BuildContext context, WorkGroupNode? workGroupNode, String value) {
if(workGroupNode == null) {
return '';
var listName = <String>[];

if (workGroupNode != null) {
listName = workGroupNode is WorkGroupDocument
? _workGroupNodesList.whereType<WorkGroupDocument>().map((node) => node.name).toList()
: _workGroupNodesList.whereType<WorkGroupFolder>().map((node) => node.name).toList();
}
final listName = workGroupNode is WorkGroupDocument
? _workGroupNodesList.whereType<WorkGroupDocument>().map((node) => node.name).toList()
: _workGroupNodesList.whereType<WorkGroupFolder>().map((node) => node.name).toList();

return _verifyNameInteractor.execute(value, [
EmptyNameValidator(),
Expand Down

0 comments on commit 17401c3

Please sign in to comment.