added null check to encryptedName

This commit is contained in:
Abhinav-grd 2021-01-24 21:37:37 +05:30
parent c4e19c56cf
commit 73fa2aad9e

View file

@ -333,7 +333,7 @@ class CollectionsService {
Collection getCollectionWithDecryptedName(Collection collection) {
var name;
if (collection.encryptedName != "") {
if (collection.encryptedName != null && collection.encryptedName != "") {
name = utf8.decode(CryptoUtil.decryptSync(
Sodium.base642bin(collection.encryptedName),
getCollectionKey(collection.id),