[Client] Add null checker
This commit is contained in:
parent
8fb92bf0de
commit
ca3bc1b6ad
|
@ -307,6 +307,7 @@ 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 = [];
|
||||||
|
if (params == null && invite != null)
|
||||||
for (int i = 0; i < invite.length; i++) inviteIDs.add(invite[i].id);
|
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(
|
||||||
|
|
Loading…
Reference in a new issue