Skip to content

Commit

Permalink
Comment on call to deserialize().
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpfs committed Feb 7, 2017
1 parent 85a97f3 commit d1f5c06
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Expand Up @@ -29,6 +29,10 @@ function Render(opts) {

function render(chunk, encoding, cb) {
if(!Node.is(chunk, Node.EOF)) {
/*
* this caters for when a stream is being piped directly and
* has not been deserialized to a real AST node
*/
if(!chunk._type) {
chunk = Node.deserialize(chunk);
}
Expand Down

0 comments on commit d1f5c06

Please sign in to comment.