|
|
@@ -83,11 +83,11 @@ proto.evaluateInternal = function evaluateInternal(vars) {
|
|
|
}
|
|
|
|
|
|
if(!(inputVal instanceof Array)) {
|
|
|
- throw new Error("Input to $map must be an Array, not a " + typeof inputVal + " 16883");
|
|
|
+ throw new Error("Uassert 16883: Input to $map must be an Array, not a " + typeof inputVal);
|
|
|
}
|
|
|
|
|
|
if(inputVal.length === 0) {
|
|
|
- return [];
|
|
|
+ return inputVal;
|
|
|
}
|
|
|
|
|
|
// Diverge from Mongo source here, as Javascript has a builtin map operator.
|