diff --git a/lib/less/visitors/visitor.js b/lib/less/visitors/visitor.js index 235ce85e9..6f6bc5b08 100644 --- a/lib/less/visitors/visitor.js +++ b/lib/less/visitors/visitor.js @@ -80,8 +80,16 @@ class Visitor { } } - if (visitArgs.visitDeeper && node && node.accept) { - node.accept(this); + if (visitArgs.visitDeeper && node) { + if (node.length) { + for (var i = 0, cnt = node.length; i < cnt; i++) { + if (node[i].accept) { + node[i].accept(this); + } + } + } else if (node.accept) { + node.accept(this); + } } if (funcOut != _noop) {