[Client] Add null checker

This commit is contained in:
Christian Pauly 2019-09-27 04:57:04 +00:00
parent 8fb92bf0de
commit ca3bc1b6ad

View file

@ -307,7 +307,8 @@ class Client {
Future<String> createRoom( Future<String> createRoom(
{List<User> invite, Map<String, dynamic> params}) async { {List<User> invite, Map<String, dynamic> params}) async {
List<String> inviteIDs = []; List<String> inviteIDs = [];
for (int i = 0; i < invite.length; i++) inviteIDs.add(invite[i].id); if (params == null && invite != null)
for (int i = 0; i < invite.length; i++) inviteIDs.add(invite[i].id);
final dynamic resp = await connection.jsonRequest( final dynamic resp = await connection.jsonRequest(
type: HTTPType.POST, type: HTTPType.POST,