[Client] Add null checker
This commit is contained in:
parent
8fb92bf0de
commit
ca3bc1b6ad
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue