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

Added fix to prevent error for Firestore v5.5.0 #32

Merged
merged 5 commits into from
Nov 12, 2018
Merged

Added fix to prevent error for Firestore v5.5.0 #32

merged 5 commits into from
Nov 12, 2018

Commits on Oct 24, 2018

  1. Added fix to prevent error for Firestore v5.5.0

    This message shows up now... added the fix as described.
    
    ```
    @firebase/firestore: Firestore (5.5.0): 
    The behavior for Date objects stored in Firestore is going to change
    AND YOUR APP MAY BREAK.
    To hide this warning and ensure your app does not break, you need to add the
    following code to your app before calling any other Cloud Firestore methods:
    
      const firestore = firebase.firestore();
      const settings = {/* your settings... */ timestampsInSnapshots: true};
      firestore.settings(settings);
    
    With this change, timestamps stored in Cloud Firestore will be read back as
    Firebase Timestamp objects instead of as system Date objects. So you will also
    need to update code expecting a Date to instead expect a Timestamp. For example:
    
      // Old:
      const date = snapshot.get('created_at');
      // New:
      const timestamp = snapshot.get('created_at');
      const date = timestamp.toDate();
    
    Please audit all existing usages of Date when you enable the new behavior. In a
    future release, the behavior will change to the new behavior, so if you do not
    follow these steps, YOUR APP MAY BREAK.
    ```
    CreativeGuy2013 committed Oct 24, 2018
    Configuration menu
    Copy the full SHA
    7247199 View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2018

  1. Configuration menu
    Copy the full SHA
    9959de8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    948ba47 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    679d2ec View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    56e6044 View commit details
    Browse the repository at this point in the history