From 3d23cce4b18bd355fa3e593245cde04c3c0300bb Mon Sep 17 00:00:00 2001 From: marija Date: Fri, 5 Feb 2016 16:56:19 +0100 Subject: [PATCH] use instanceof operator for class comparison --- lib/less/parser/parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }