Check if onRequest is defined for the current object before calling it.
This commit is contained in:
parent
18926fb8e0
commit
38eb79123d
1 changed files with 2 additions and 1 deletions
|
@ -239,7 +239,8 @@ public final class RequestEvaluator implements Runnable {
|
|||
// try calling onRequest() function on object before
|
||||
// calling the actual action
|
||||
try {
|
||||
scriptingEngine.invoke (currentElement, "onRequest", new Object[0], false);
|
||||
if (scriptingEngine.hasFunction (currentElement, "onRequest"))
|
||||
scriptingEngine.invoke (currentElement, "onRequest", new Object[0], false);
|
||||
} catch (RedirectException redir) {
|
||||
throw redir;
|
||||
} catch (Exception ignore) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue