aboutsummaryrefslogtreecommitdiffstats
path: root/src/parser.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.js')
-rw-r--r--src/parser.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser.js b/src/parser.js
index 9f2442de..dadab1fb 100644
--- a/src/parser.js
+++ b/src/parser.js
@@ -515,7 +515,7 @@ function parser(text, json){
if (instance)
instance = instance[key];
}
- if (typeof instance != $function) {
+ if (!isFunction(instance)) {
throwError("should be a function", token);
}
return instance;
@@ -765,7 +765,7 @@ function compileExpr(expr) {
// TODO(misko): Deprecate? Remove!
// I think that compilation should be a service.
function expressionCompile(exp) {
- if (typeof exp === $function) return exp;
+ if (isFunction(exp)) return exp;
var fn = compileCache[exp];
if (!fn) {
fn = compileCache[exp] = parser(exp).statements();