ViewModel: Extend onRendered function

You just hit on a Blaze bug. This is one of the reasons ViewModel 2 uses the syntax {{b "value: property"}} instead. Version 2 doesn’t have this problem.

In your case this is the line that’s confusing Blaze:

Meteor.startup(function() {
    Tests.insert({firstname:'John',lastname:'Doe'});
});

It’s run on both client and server. If you need to perform this insert on client startup then there’s nothing to do but wait for the subscription to be ready.

1 Like