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

Keep sort position of observed docs consistent with real sorting and only use observed docs to publish changes in sort position #623

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ericdepotter
Copy link

fixes #621

…only use observed docs to publish changes in sort position

let beforeDoc = collectionScope._indexConfiguration.collection.findOne(before);
let start = fromIndex, end = toIndex, sortIncrement = -1;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use const

let beforeDoc = collectionScope._indexConfiguration.collection.findOne(before);
let start = fromIndex, end = toIndex, sortIncrement = -1;
if (toIndex < fromIndex) {
start = toIndex, end = fromIndex, sortIncrement = 1;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spread this out onto several lines

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.

Old documents are returned when new document is inserted
2 participants