-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 2.4.1, 2.4.3
-
Component/s: JavaScript
-
None
-
Fully Compatible
-
ALL
-
-
Build 9 (09/18/15)
When saving script into system.js, if the script starts with the var keyword (example, var root = this;), the script will fail to load when trying to use the script from a map reduce or even db.loadServerScripts() from the shell produces:
JavaScript execution failed: Error: 16722 JavaScript execution failed: SyntaxError: Unexpected token var at src/mongo/shell/db.js:L1001
The was not a problem in 2.2.x, and doesn't appear to be a problem in a 64-bit Linux build (2.4.3).
- is related to
-
SERVER-8632 System.js functions are not available to map/reduce jobs
- Closed