title: Why would you execute $q.when() without passing it a promise/value?
body: <p>According to <a href="https://docs.angularjs.org/api/ng/service/$q" rel="noreferrer">the Angular docs on $q</a>, $q.when() expects a promise/value to passed in.</p>
  
  <p>But I just came across someone else's code where it's called without passing in any params. Here's a simplified version of what I see: </p>
  
  <pre><code>var modal = false;
  
  if (modalOpen) {
      return $q.when()
  }
  modalOpen = true;
  
  modal = newModal({
      template: opts.template,
  });
  
  modal.result.finally(function(){ 
      modalOpen = false;
  });
  }
  </code></pre>