mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
use instanceof operator for class comparison
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user