title: Firebase Firestore Get Document not working with Swift
body: <p>I want to try Firebase Cloud Firestore to get some data using the code below.</p>
  
  <p>A button press should fetch a boolean value and if its meet some conditions the app will navigate to another view controller, it works fine on the first click but I noticed that when I navigate back and press the same button no result will be fetched again !!</p>
  
  <pre><code>db.collection("users").document((Auth.auth().currentUser?.uid)!).getDocument { (snap, error) in
                  if error != nil {
                      print(error.debugDescription)
                  }
                  if snap != nil {
                      let isPosted = snap?.data()["isPosted"] as! Bool
                      let isStroe = snap?.data()["isStore"] as! Bool
                      if !isPosted &amp;&amp; !isStroe {
                          print("first post")
                          let useraccountVC = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "newData") as! UINavigationController
                          self.present(useraccountVC, animated: true, completion: nil)
                      }else if isPosted &amp;&amp; isStroe {
                          print("store")
                          let useraccountVC = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "newData") as! UINavigationController
                          self.present(useraccountVC, animated: true, completion: nil)
                      }else if !isPosted &amp;&amp; isStroe{
                          print("store")
                          let useraccountVC = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "newData") as! UINavigationController
                          self.present(useraccountVC, animated: true, completion: nil)
                      }else{
  
                          print("cant post any more")
                      }
  
                  }
  
              }
  </code></pre>