title: Passing undifined to Handlebars.compile
body: <p>I just started with Handlebars.js and running into a small problem</p>
  
  <p>I'm using version 1.0.0 width data I get from JSON via jQuery. Everything works fine, my data gets pulled through to the template and the data gets displayed like expected, however I keep getting this error.</p>
  
  <pre><code>Error: You must pass a string or Handlebars AST to Handlebars.compile. You passed undefined
  </code></pre>
  
  <p>When I log source in the console I get this, I know it's not a string but this is what this tutorial explains <a href="http://javascriptplayground.com/blog/2012/05/javascript-templating-handlebars-tutorial/" rel="nofollow">http://javascriptplayground.com/blog/2012/05/javascript-templating-handlebars-tutorial/</a>. Am I wrong?</p>
  
  <pre><code>{{#sets}}
  &lt;li class="products"&gt;
      &lt;h1&gt;{{title}}&lt;/h1&gt;
      &lt;img src="{{img}}"&gt;
  &lt;/li&gt;
  {{/sets}}
  </code></pre>
  
  <p>Here is the rest of it</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;div id="sets-template-inner" class="show-for'small"&gt;
          &lt;div class="slideshow-wrapper"&gt;
              &lt;div class="preloader"&gt;&lt;/div&gt;
              &lt;ul data-orbit&gt; 
                  &lt;script id="full-sets-template-mobile" type="text/x-handlebars-template"&gt;
                          {{#sets}}
                              &lt;li class="products"&gt;
                                  &lt;h1&gt;{{title}}&lt;/h1&gt;
                                  &lt;img src="{{img}}"&gt;
                              &lt;/li&gt;
                          {{/sets}}
                  &lt;/script&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>jQuery</p>
  
  <pre><code>function getProductsSets() {
    $.getJSON('products/products.json', {
        format: "json"
      }).done(function(json) {
        $.each(json.sets, function() {
          var source = $('#full-sets-template-mobile').html();
          console.log(source)
          var template = Handlebars.compile(source);
          var data = template(json);
          var html = $('#sets-template-inner').html(data);
        });
      }).fail(function() {
        console.log('failed');
      });
  }
  </code></pre>
  
  <p>JSON</p>
  
  <pre><code>{
      "sets":
      [
              {
                      "title": "raw bones",
                      "img": "img/sets/set1.jpg",
                      "desc": "Raw pine table with 2 chairs and a bench.",
                      "base": 1200,
                      "seating":
                      [
                              {
                                      "price": 0,
                                      "name": "4 seater"
                              },
                              {
                                      "price": 400,
                                      "name": "6 seater"
                              },
                              {
                                      "price": 800,
                                      "name": "8 seater"
                              }
                      ]
              },
              {
                      "title": "sky blue",
                      "img": "img/sets/set1.jpg",
                      "desc": "Raw pine table with 2 chairs and a bench",
                      "base": 1300,
                      "seating":
                      [
                              {
                                      "price": 0,
                                      "name": "4 seater"
                              },
                              {
                                      "price": 500,
                                      "name": "6 seater"
                              },
                              {
                                      "price": 800,
                                      "name": "8 seater"
                              }
                      ]   
              }
      ]                
  </code></pre>
  
  <p>}</p>
  
  <p>Hope I have enough info here and thanks for any help.</p>