aboutsummaryrefslogtreecommitdiffstats
path: root/src/Parser.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/Parser.js')
-rw-r--r--src/Parser.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/Parser.js b/src/Parser.js
index 5c2307e4..5eb75713 100644
--- a/src/Parser.js
+++ b/src/Parser.js
@@ -599,14 +599,11 @@ Parser.prototype = {
for ( var i = 0; i < argsFn.length; i++) {
args.push(argsFn[i](self));
}
- var fnPtr = fn(self);
- if (typeof fnPtr === 'function') {
- return fnPtr.apply(self, args);
- } else if (fnPtr === undefined) {
- return fnPtr;
- } else {
- throw "Expression '" + fn.isAssignable + "' is not a function.";
- }
+ var fnPtr = fn(self) || noop;
+ // IE stupidity!
+ return fnPtr.apply ?
+ fnPtr.apply(self, args) :
+ fnPtr(args[0], args[1], args[2], args[3], args[4]);
};
},