diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-04-08 15:26:12 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-04-08 15:26:12 -0400 |
commit | 48d2acc0de66704bce7fc20ca1f50cdf5c522a80 (patch) | |
tree | b1b7384bf3e574c264aa3194204bb05576c80421 /scripting/engine_v8.cpp | |
parent | 0efadc48e9da3259765126e035aa33e2cdf0afdd (diff) | |
download | mongo-48d2acc0de66704bce7fc20ca1f50cdf5c522a80.tar.gz |
fix where on v8 SERVER-864
Diffstat (limited to 'scripting/engine_v8.cpp')
-rw-r--r-- | scripting/engine_v8.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripting/engine_v8.cpp b/scripting/engine_v8.cpp index 35f2eb8a1e7..d62726834de 100644 --- a/scripting/engine_v8.cpp +++ b/scripting/engine_v8.cpp @@ -232,7 +232,7 @@ namespace mongo { string code = raw; if ( code.find( "function" ) == string::npos ){ if ( code.find( "\n" ) == string::npos && - code.find( "return" ) == string::npos && + ! hasJSReturn( code ) && ( code.find( ";" ) == string::npos || code.find( ";" ) == code.size() - 1 ) ){ code = "return " + code; } |