mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
Merge pull request #1773 from matthew-dean/master
Fixes "function" test against regular expressions
This commit is contained in:
@@ -681,7 +681,7 @@ function initFunctions() {
|
||||
|
||||
// default
|
||||
f = tree.defaultFunc;
|
||||
tf.default = f.eval.bind(f);
|
||||
tf["default"] = f.eval.bind(f);
|
||||
|
||||
} initFunctions();
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ less.Parser = function Parser(env) {
|
||||
}
|
||||
|
||||
function expect(arg, msg) {
|
||||
var result = (typeof arg === "function") ? arg.call(parsers) : $(arg);
|
||||
var result = (Object.prototype.toString.call(arg) === '[object Function]') ? arg.call(parsers) : $(arg);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user