dave-kennedy / clean-html

HTML cleaner and beautifier for Node
The Unlicense
47 stars 10 forks source link

TypeError: Cannot read property 'forEach' of undefined #1

Closed purepear closed 8 years ago

purepear commented 8 years ago

node_modules/clean-html/index.js:251:10

you can check if nodes are array.. sth like

function render(nodes) {
    var html = '';
    nodes = nodes || []

    nodes.forEach(function (node) {
...
Pajamaman commented 8 years ago

Sorry it took me so long to notice. Can you provide a sample that would cause this to happen?

purepear commented 8 years ago

I was doing some prototyping and i don't remember what the case was :) sorry

purepear commented 8 years ago

feel free to close it