Skip to content

Conversation

@ericdepotter
Copy link

fixes #621

…only use observed docs to publish changes in sort position
this.changed(collectionName, collectionScope.generateId(doc), doc);

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