File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/powersync_core/lib/src/web Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import 'package:web/web.dart' hide RequestMode;
20
20
import 'sync_worker_protocol.dart' ;
21
21
import 'web_bucket_storage.dart' ;
22
22
23
- final _logger = autoLogger ;
23
+ final _logger = debugLogger ;
24
24
25
25
void main () {
26
26
_SyncWorker ().start ();
@@ -244,14 +244,18 @@ class _SyncRunner {
244
244
final crudThrottleTime = Duration (milliseconds: crudThrottleTimeMs);
245
245
Stream <UpdateNotification > crudStream =
246
246
powerSyncUpdateNotifications (Stream .empty ());
247
- if (database.updates != null ) {
248
- final filteredStream = database.updates !
249
- .transform (UpdateNotification .filterTablesTransformer (tables));
247
+ if (database.updates case final updates ? ) {
248
+ final filteredStream =
249
+ updates .transform (UpdateNotification .filterTablesTransformer (tables));
250
250
crudStream = UpdateNotification .throttleStream (
251
251
filteredStream,
252
252
crudThrottleTime,
253
253
addOne: UpdateNotification .empty (),
254
254
);
255
+ } else {
256
+ _logger.warning (
257
+ 'Database is missing updates stream, sync worker will not upload '
258
+ 'reliably.' );
255
259
}
256
260
257
261
final syncParams = syncParamsEncoded == null
You can’t perform that action at this time.
0 commit comments