title: How to prevent Meteor.js Templates from rendering without data
body: <p>Could someone please help me to understand Meteors template behavior?</p>
  
  <p>I would like to implement a notification system in my project, similar to Apples Growl.
  It uses simple jQuery effects to make a message appear, when a record is written to the database. I've simplified the code example, to show the essential problem:</p>
  
  <p>The code:</p>
  
  <pre><code>var Messages = new Meteor.Collection("messages");
  
  if (Meteor.isClient) {
     Template.Notification.Message = function() {
       return Message.findOne({}, {sort: {seq: -1}});
     };
  
     Template.Notification.rendered = function() {
      $("#livebar").fadeIn(400).delay(1000).fadeOut(400);
     }
  }
  </code></pre>
  
  <p>The template:</p>
  
  <pre><code>&lt;template name="Notification"&gt;
  &lt;div class="row"&gt;
     &lt;div class="span6 alert alert-error" id="livebar" style="display:none;"&gt;
          {{Messages.text}}
     &lt;/div&gt;
  &lt;/div&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>If the page is rendered, an empty invisible area gets rendered with the jQuery effect, and afterwards the system loads the reactive datasource (Message) and renders the area again!
  I've tried to prevent it from rendering twice, but didn't succeed. The error seems to be quite easy to fix, but I'm stuck here. I would appreciate any help!</p>