fix: Add missing null check
With Synapse 1.38 SyncUpdate.accountData is null if it is empty.
This commit is contained in:
parent
5b40088292
commit
99c900be9c
|
|
@ -484,8 +484,10 @@ class Bootstrap {
|
||||||
for (final entry in secretsToStore.entries) {
|
for (final entry in secretsToStore.entries) {
|
||||||
futures.add(
|
futures.add(
|
||||||
client.onSync.stream
|
client.onSync.stream
|
||||||
.firstWhere((syncUpdate) => syncUpdate.accountData
|
.firstWhere((syncUpdate) =>
|
||||||
.any((accountData) => accountData.type == entry.key))
|
syncUpdate.accountData != null &&
|
||||||
|
syncUpdate.accountData
|
||||||
|
.any((accountData) => accountData.type == entry.key))
|
||||||
.then((_) =>
|
.then((_) =>
|
||||||
Logs().v('New Key with type ${entry.key} was created')),
|
Logs().v('New Key with type ${entry.key} was created')),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue