raycmorgan/Mu — pull request #39 by georgecalm (2012-06-23 04:22:19+00:00)
Title: Fixing issue: mu.render advertises a parse-object as the first param, but expects an array

**Issue:** mu.render advertises the parse object as the first param, but expects an array (as it gets one from the cache). Example:

var mu = require('mu')
, parsed = mu.compileText('{{greeting}}, world!')
, stream = mu.render(parsed, {greeting: 'Hello'});
stream.on('data', function (data) {
console.log(data);
});

Throws the following:

return beginRender(parsed[0].tokens, view, mu.cache);
^
TypeError: Cannot read property 'tokens' of undefined
at Object.render (./lib/mu.js:108:33)