I am getting the following error from Firestore in console, in Angular.
@firebase/firestore: Firestore (5.8.3): The timestampsInSnapshots setting now defaults to true and you no longer need to explicitly set it. In a future release, the setting will be removed entirely and so it is recommended that you remove it from your firestore.settings() call now.
Any suggestions, how to get rid of it?
Go to your app.modules.ts file and add import:
import { FirestoreSettingsToken} from '@angular/fire/firestore';
Then add this value in your providers array:
providers: [{ provide: FirestoreSettingsToken, useValue: {} }]
In general, we configure firebase in our app in the following way:
firebase.firestore().settings({
timestampsInSnapshots: true
});
For the above configuration, It shows the following warning:
In Order to resolve it, Just simply remove the timestampsInSnapshots
attribute from the settings
parameter. After fixing, your config should be changed to:
firebase.firestore().settings({});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With