coliver 2004/01/10 08:53:43
Modified: src/java/org/apache/cocoon/components/flow/javascript/fom
fom_system.js
Log:
Handle undefined or null function parameter
Revision Changes Path
1.3 +4 -1
cocoon-2.1/src/java/org/apache/cocoon/components/flow/javascript/fom/fom_system.js
Index: fom_system.js
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/flow/javascript/fom/fom_system.js,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- fom_system.js 10 Jan 2004 00:04:37 -0000 1.2
+++ fom_system.js 10 Jan 2004 16:53:43 -0000 1.3
@@ -2,7 +2,10 @@
FOM_Cocoon.prototype.sendPageAndWait = function(uri, bizData, fun) {
this.sendPage(uri, bizData, new Continuation());
- if (fun instanceof Function) {
+ if (fun) {
+ if (!(fun instanceof Function)) {
+ throw "Expected a function instead of: " + fun;
+ }
fun();
}
FOM_Cocoon.suicide();