Merge pull request #1773 from matthew-dean/master

Fixes "function" test against regular expressions
This commit is contained in:
Luke Page
2014-01-02 23:12:03 -08:00
2 changed files with 2 additions and 2 deletions

View File

@@ -681,7 +681,7 @@ function initFunctions() {
// default
f = tree.defaultFunc;
tf.default = f.eval.bind(f);
tf["default"] = f.eval.bind(f);
} initFunctions();

View File

@@ -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;
}