Skip to content

fix: e.endUpdate is not a function#2

Merged
harry-73 merged 1 commit intomainfrom
harry-73-patch-2
Mar 9, 2026
Merged

fix: e.endUpdate is not a function#2
harry-73 merged 1 commit intomainfrom
harry-73-patch-2

Conversation

@harry-73
Copy link
Copy Markdown
Owner

@harry-73 harry-73 commented Mar 4, 2026

pauseObservers/resumeObservers patch and restore store.endUpdate for every store, but some entries in Meteor.connection._stores (from queued method collection names) don’t have endUpdate. Restoring store.endUpdate = store._originalEnd when _originalEnd was undefined left endUpdate non-callable and triggered the error.

Fix: Only patch/restore when the method exists: in pauseObservers, do it only if typeof store.endUpdate === 'function'; in resumeObservers, only if typeof store._originalEnd === 'function'. Stores without endUpdate are left unchanged so the TypeError no longer occurs.

pauseObservers/resumeObservers patch and restore store.endUpdate for every store, but some entries in Meteor.connection._stores (from queued method collection names) don’t have endUpdate. Restoring store.endUpdate = store._originalEnd when _originalEnd was undefined left endUpdate non-callable and triggered the error.

Fix: Only patch/restore when the method exists: in pauseObservers, do it only if typeof store.endUpdate === 'function'; in resumeObservers, only if typeof store._originalEnd === 'function'. Stores without endUpdate are left unchanged so the TypeError no longer occurs.
@harry-73 harry-73 merged commit 3d3d637 into main Mar 9, 2026
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

Successfully merging this pull request may close these issues.

1 participant