Skip to content

Commit

Permalink
fix(afs): catch error when enabling persistence (#1300)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maistho authored and jamesdaniels committed Oct 25, 2017
1 parent 7eb3e51 commit 61245a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/firestore/firestore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export class AngularFirestore {
constructor(public app: FirebaseApp, shouldEnablePersistence) {
this.firestore = app.firestore();

this.persistenceEnabled$ = shouldEnablePersistence ?
from(app.firestore().enablePersistence().then(() => true)) :
this.persistenceEnabled$ = shouldEnablePersistence ?
from(app.firestore().enablePersistence().then(() => true, () => false)) :
from(new Promise((res, rej) => { res(false); }));
}

Expand Down

0 comments on commit 61245a3

Please sign in to comment.