Skip to content

Commit 074500d

Browse files
Add chain in flush & destroy calls, to ensure the return type is
1 parent 650825f commit 074500d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

splitio_web/lib/splitio_web.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,8 @@ class SplitioWeb extends SplitioPlatform {
678678
bucketingKey: bucketingKey,
679679
);
680680

681-
return client.flush().toDart;
681+
// `then` chain to ensure the return type is `Future<void>`
682+
return client.flush().toDart.then<void>((_) {});
682683
}
683684

684685
@override
@@ -689,7 +690,7 @@ class SplitioWeb extends SplitioPlatform {
689690
bucketingKey: bucketingKey,
690691
);
691692

692-
return client.destroy().toDart;
693+
return client.destroy().toDart.then<void>((_) {});
693694
}
694695

695696
@override

splitio_web/test/splitio_web_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,6 @@ void main() {
675675
}));
676676
});
677677

678-
// @TODO validate full config with pluggable Browser SDK modules
679678
test('init with config: full config', () async {
680679
SplitioWeb _platform = SplitioWeb();
681680

0 commit comments

Comments
 (0)