mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Adjust observeChanges skip/limit ordered observe error message (#9373)
* Adjust observeChanges skip/limit ordered observe error message The `Cursor.observeChanges` function throws an error when there is an attempt to use an unordered observe with skip/limit. This error can also be thrown when attempting the same thing with `Cursor.observe`. This is because `Cursor.observe` ends up calling back to `Cursor.observeChanges`. When using `Cursor.observe` however, the shared error message is a bit misleading, as `addedAt` should be used instead of `addedBefore`. This commit adjusts the shared error message to cover both `observeChanges` and `observe` scenarios. Fixes #4996. * Bump minimongo patch version
This commit is contained in:
@@ -231,8 +231,8 @@ export default class Cursor {
|
||||
// XXX allow skip/limit with unordered observe
|
||||
if (!options._allow_unordered && !ordered && (this.skip || this.limit)) {
|
||||
throw new Error(
|
||||
'must use ordered observe (ie, \'addedBefore\' instead of \'added\') ' +
|
||||
'with skip or limit'
|
||||
"Must use an ordered observe with skip or limit (i.e. 'addedBefore' " +
|
||||
"for observeChanges or 'addedAt' for observe, instead of 'added')."
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: "Meteor's client-side datastore: a port of MongoDB to Javascript",
|
||||
version: '1.4.1'
|
||||
version: '1.4.2'
|
||||
});
|
||||
|
||||
Package.onUse(api => {
|
||||
|
||||
Reference in New Issue
Block a user