Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline storage doesn't persist events #382

Open
2 of 12 tasks
snazarkoo opened this issue Oct 25, 2023 · 0 comments
Open
2 of 12 tasks

Offline storage doesn't persist events #382

snazarkoo opened this issue Oct 25, 2023 · 0 comments

Comments

@snazarkoo
Copy link

snazarkoo commented Oct 25, 2023

This is a...

  • 🪲 Bug Report
  • 🚀 Feature Request
  • 📜 Documentation Request

Which version of Redux Beacon are you using?

  • v2.1.0

Which target(s) are you using?

  • Google Analytics
  • Google Analytics (gtag)
  • React Native Google Analytics
  • Google Tag Manager
  • React Native Google Tag Manager
  • Amplitude
  • Segment
  • React Native Segment
  • Other/Third Party: ...(custom Firebase target)

🪲 What are the steps to reproduce your issue?

  1. Go offline
  2. Invoke events

🪲 What did you expect to happen?

Events should be persisted in the storage and sending later once connection is established

🪲 What happened instead?

Events are not persisted

Can you help out?

The problem is located here. Potential fix is described below:

         else {
-            offlineStorage.saveEvents(e);
-            ifLoggerLog(e, action, prevState, true, false);
+            if (!isEmptyArray(e)) {
+                offlineStorage.saveEvents(e);
+                ifLoggerLog(e, action, prevState, true, false);
+            }
         }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant