diff --git a/lib/less/parser/parser.js b/lib/less/parser/parser.js index e8bd7e780..1909ecf67 100644 --- a/lib/less/parser/parser.js +++ b/lib/less/parser/parser.js @@ -55,7 +55,7 @@ var Parser = function Parser(context, imports, fileInfo) { function expect(arg, msg, index) { // some older browsers return typeof 'function' for RegExp - var result = (Object.prototype.toString.call(arg) === '[object Function]') ? arg.call(parsers) : parserInput.$re(arg); + var result = (arg instanceof Function || Object.prototype.toString.call(arg) === '[object Function]') ? arg.call(parsers) : parserInput.$re(arg); if (result) { return result; }