Skip to content

Commit 54a9674

Browse files
ABTastyAdelCopilot
andauthored
Update lib/visitor.dart
Co-authored-by: Copilot <[email protected]>
1 parent 4e5e276 commit 54a9674

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/visitor.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,16 +311,14 @@ class Visitor with EmotionAiDelegate {
311311

312312
// First check if visitorId exists in cache using config
313313
bool visitorExists =
314-
await (config.visitorCacheImp?.visitorExists(visitorId) ??
315-
Future.value(false));
314+
await config.visitorCacheImp?.visitorExists(visitorId) ?? false;
316315

317316
if (visitorExists) {
318317
idToLookup = visitorId;
319318
} else if (anonymousId != null) {
320319
// If visitorId doesn't exist but we have anonymousId, check if it exists
321320
bool anonymousExists =
322-
await (config.visitorCacheImp?.visitorExists(anonymousId!) ??
323-
Future.value(false));
321+
await config.visitorCacheImp?.visitorExists(anonymousId!) ?? false;
324322
if (anonymousExists) {
325323
idToLookup = anonymousId!;
326324
}

0 commit comments

Comments
 (0)