Whenever I run a specific route on my ember app, an 'Uncaught #error" message appears in my console. Despite not affecting the functionality of the code and seemingly working flawlessly, I can't help but wonder why it's there. After some investigation, I've pinpointed the source to an {{#each}} statement, but upon closely examining the code, I can't seem to find any issues with it. Here are the relevant snippets:
index.html:
<script type="text/x-handlebars" data-template-name="blog/index">
<h4>Recent Posts</h4>
<table class="table">
{{#each}}
<tr><td>
{{#link-to 'blog.post' this}}
<h4>{{title}} <small class="muted">by {{author}}</small><h4>
{{/link-to}}
</td></tr>
{{/each}}
</table>
</script>
App.js
var App = Ember.Application.create({
LOG_TRANSITIONS: true
});
App.ApplicationAdapter = DS.FixtureAdapter;
App.Router.map(function () {
this.resource('blog', { path: '/blog' }, function () {
this.route('post', { path: '/post/:post_id' });
});
});
App.BlogIndexRoute = Ember.Route.extend({
model: function () {
return this.store.find('post');
}
});
App.Post = DS.Model.extend({
title: DS.attr(),
author: DS.attr(),
date: DS.attr(),
excerpt: DS.attr(),
body: DS.attr()
});
App.Post.FIXTURES = [
{
id: '1',
title: 'Rails in Omakase',
author: 'd2h',
date: new Date('12-27-2012'),
excerpt: 'This is an excerpt',
body: 'This is my body!'
},
{
id: '2',
title: 'The Parley Letter',
author: 'd2h',
date: new Date('12-24-2012'),
excerpt: 'This is an excerpt',
body: 'This is my body!'
}
];
Removing the {{#each}} statement eliminates the error message in the console, while adding it back results in no visible issues. What could be causing this discrepancy?