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

ObservableCollection.upsert() returns wrong type #72

Open
ijager opened this issue Jan 12, 2017 · 1 comment
Open

ObservableCollection.upsert() returns wrong type #72

ijager opened this issue Jan 12, 2017 · 1 comment

Comments

@ijager
Copy link
Contributor

ijager commented Jan 12, 2017

The docstring says:

@returns {Observable<{numberAffected, insertedId}>} Observable which completes with an * Object that contain the keys numberAffected and insertedId.

However the return value is let obs = this._createObservable<number>(observers);

So either there is a bug in the documentation or in the implementation.

Edit:

So The original Meteor Collection.upsert() function actually returns {numberAffected, insertedId} directly instead of in the callback.

@Orad
Copy link

Orad commented Nov 25, 2017

InsertedId is what makes upsert worthy , no sense to drop it and return only the number of affected rows.
Any progress with this one?

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

No branches or pull requests

2 participants