fix(app): preserve memidb event listeners - #9270
Merged
mikehardy merged 1 commit intoSep 1, 2026
Merged
Conversation
mikehardy
approved these changes
Aug 31, 2026
mikehardy
left a comment
Collaborator
There was a problem hiding this comment.
Hey @OskarEichler 👋
Thanks for the PR - this looks like a real problem to me. I ran local Jest/unit plus the android/ios/macos e2e suite against it here and it came out clean. Pending CI, then I'll merge.
Cheers
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9270 +/- ##
============================================
- Coverage 68.50% 68.47% -0.03%
Complexity 1915 1915
============================================
Files 522 523 +1
Lines 38116 38136 +20
Branches 5189 5189
============================================
+ Hits 26108 26110 +2
- Misses 10222 10241 +19
+ Partials 1786 1785 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
Removing an IndexedDB fallback listener that was never registered no longer deletes the last real listener. The prior
findIndex()result of-1was passed directly tosplice(-1, 1), silently suppressing a legitimate request or transaction callback.Implementation
Only splice the listener array when a matching listener was found. Registered-listener removal behavior is unchanged.
Verification
The exact baseline regression registers two success listeners, removes an unrelated callback, and observes that the second real listener is never called. Both listeners run with this change. Complete repository gates pass:
yarn lerna:prepareyarn tests:jest --runInBand— 104 suites, 1,480 tests, 31 snapshotsyarn tsc:compileyarn tsc:compile:consumeryarn lint:depsyarn reference:apiyarn compare:typesgit diff --checkCompatibility
No public API/type or breaking change. This aligns the fallback EventTarget with standard no-op removal semantics.