Also my model.getPosts function works better like this:
model.getPosts = function() {
// var posts = JSON.parse( model.getLocalStore() )[‘posts’];
var posts = model.getLocalStore();
posts = posts[‘posts’];
return posts;
}
Instead of the commented out line.