-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
(firestore) Update to rxjs pipeable operators #1623
Conversation
.pipe( | ||
map(action => | ||
action.payload.docChanges | ||
.map(change => ({ type: change.type, payload: change })))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be a pipe + map?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
action.payload.docChanges isn't Observable, so I think no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, derp.
src/firestore/firestore.ts
Outdated
@@ -122,10 +118,12 @@ export class AngularFirestore { | |||
}); | |||
|
|||
this.persistenceEnabled$ = zone.runOutsideAngular(() => | |||
shouldEnablePersistence ? from(this.firestore.enablePersistence().then(() => true, () => false)) | |||
: of(false) | |||
shouldEnablePersistence ? Observable.from(this.firestore.enablePersistence().then(() => true, () => false)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should import of
and from
rather than using Observable.from
and Observable.of
Checklist
yarn install
,yarn test
run successfully? (yes/no; required)Description
Updates firstore to rxjs pipeable operators