I’ve been messing around with Mustache.js & the Github api & have run into a little snag when I try to load more results that actually aren’t available. My hope was to show a message or throw an error when this happens but it does not work.
Take a look at http://jsbin.com/upohuz/4/edit to see where I’m at because I’m sure its a simple fix or something that I’ve overlooked.
The error I get when I try to load items that aren’t available is:
Uncaught Error: Syntax error, unrecognized expression:
which pertains to line 59 of the example:
$(html).appendTo('#foo');
Any help would be much appreciated.
You need to write
It will not throw any errors on empty html.