diff --git a/lib/less/parser.js b/lib/less/parser.js index d3c6ce66..3775b8fb 100644 --- a/lib/less/parser.js +++ b/lib/less/parser.js @@ -1066,7 +1066,8 @@ less.Parser = function Parser(env) { } option = option && option[1]; - + if (!elements) + error("Missing target selector for :extend()."); extend = new(tree.Extend)(new(tree.Selector)(elements), option, index); if (extendList) { extendList.push(extend); } else { extendList = [ extend ]; }