Permalink
Browse files

Fix crash attempting to run validations

  • Loading branch information...
1 parent 1a97a1d commit e6412fc2737c1c2ade42087b3ea1c6a43b109880 @snej snej committed Jan 22, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 base/jsserver.go
View
@@ -79,7 +79,9 @@ func (server *JSServer) DefineNativeFunction(name string, function func(otto.Fun
// Invokes the JS function. Not thread-safe! This is exposed for use by unit tests.
func (server *JSServer) DirectCallFunction(inputs []string) (interface{}, error) {
- server.Before()
+ if server.Before != nil {
+ server.Before()
+ }
var result otto.Value
var err error

0 comments on commit e6412fc

Please sign in to comment.