Fixing issue: mu.render advertises a parse-object as the first param, but expects an array #39

merged 1 commit into from Aug 20, 2012


None yet

2 participants

nemtsov commented Jun 23, 2012

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) {

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)
@raycmorgan raycmorgan merged commit b74956b into raycmorgan:master Aug 20, 2012

Thanks for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment