mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
null check on parts
This commit is contained in:
parent
3b7078e565
commit
661cd79654
2 changed files with 6 additions and 6 deletions
|
@ -133,9 +133,9 @@ namespace Bit.Core.Services
|
|||
Id = c.Id,
|
||||
OrganizationId = c.OrganizationId
|
||||
};
|
||||
CoreHelpers.NestedTraverse(nodes, 0,
|
||||
Regex.Replace(c.Name, "^\\/+|\\/+$", string.Empty).Split(NestingDelimiter),
|
||||
collectionCopy, null, NestingDelimiter);
|
||||
var parts = c.Name != null ?
|
||||
Regex.Replace(c.Name, "^\\/+|\\/+$", string.Empty).Split(NestingDelimiter) : new string[] { };
|
||||
CoreHelpers.NestedTraverse(nodes, 0, parts, collectionCopy, null, NestingDelimiter);
|
||||
}
|
||||
return nodes;
|
||||
}
|
||||
|
|
|
@ -127,9 +127,9 @@ namespace Bit.Core.Services
|
|||
Id = f.Id,
|
||||
RevisionDate = f.RevisionDate
|
||||
};
|
||||
CoreHelpers.NestedTraverse(nodes, 0,
|
||||
Regex.Replace(f.Name, "^\\/+|\\/+$", string.Empty).Split(NestingDelimiter),
|
||||
folderCopy, null, NestingDelimiter);
|
||||
var parts = f.Name != null ?
|
||||
Regex.Replace(f.Name, "^\\/+|\\/+$", string.Empty).Split(NestingDelimiter) : new string[] { };
|
||||
CoreHelpers.NestedTraverse(nodes, 0, parts, folderCopy, null, NestingDelimiter);
|
||||
}
|
||||
return nodes;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue