This commit is contained in:
2021-08-01 20:09:11 -05:00
parent b10f61a489
commit bb1d2c491c
6 changed files with 13 additions and 52 deletions

View File

@@ -241,8 +241,12 @@ namespace Gameboard.ShogiUI.Sockets.Repositories
logger.LogError(new InvalidOperationException(result.warning), result.warning);
return null;
}
return new Models.User(result.docs.Single().Name);
var userDocument = result.docs.SingleOrDefault();
if (userDocument != null)
{
return new Models.User(userDocument.Name);
}
return null;
}
}
}