-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 1.1.5
-
Component/s: AsyncWriter
-
None
-
5
-
Not Needed
-
Iteration Versailles, Iteration Wolverhampton, Iteration Xochimilco
In mongosh, we desugar objects and arrays destructuring, which might create issues for example when a function is used as the body of a $function expression in an aggregation.
For example, (function(foo) {const [a, b] = foo.split();}).toString()
becomes:
function (foo) { const _foo$split = foo.split(), _foo$split2 = _slicedToArray(_foo$split, 2), a = _foo$split2[0], b = _foo$split2[1]; }
and _sliceToArray does not exist on the server and breaks the pipeline.