HI,
I am sorting a collection both in the publication and on the client,
my code is identical:
SomeCollection.find({field1:"someval"},{sort:{sortVal:1},limit:10});
This works.
However when I chance the value to descending:
SomeCollection.find({field1:"someval"},{sort:{sortVal:-1},limit:10});
I get this error on the client
Exception from Tracker recompute function:
4fbb157….js?meteor_js_resource=true:3 Error: {{#each}} currently only accepts arrays, cursors or falsey values.
Any ideas pls?
Update: some more info on the error:
Exception in queued task: Error: {{#each}} currently only accepts arrays, cursors or falsey values.
at o (https://a.buzzy.buzz/48150624d89ccc80e05c24498fa367609400db5f.js?meteor_js_resource=true:86:995)
at https://a.buzzy.buzz/48150624d89ccc80e05c24498fa367609400db5f.js?meteor_js_resource=true:86:755
at Object.o.nonreactive (https://a.buzzy.buzz/48150624d89ccc80e05c24498fa367609400db5f.js?meteor_js_resource=true:34:4471)
at https://a.buzzy.buzz/48150624d89ccc80e05c24498fa367609400db5f.js?meteor_js_resource=true:86:590
at o.Computation._compute (https://a.buzzy.buzz/48150624d89ccc80e05c24498fa367609400db5f.js?meteor_js_resource=true:34:2427)
at new o.Computation (https://a.buzzy.buzz/48150624d89ccc80e05c24498fa367609400db5f.js?meteor_js_resource=true:34:1351)
at Object.o.autorun (https://a.buzzy.buzz/48150624d89ccc80e05c24498fa367609400db5f.js?meteor_js_resource=true:34:4290)
at Object.observe (https://a.buzzy.buzz/48150624d89ccc80e05c24498fa367609400db5f.js?meteor_js_resource=true:86:559)
at .<anonymous> (https://a.buzzy.buzz/48150624d89ccc80e05c24498fa367609400db5f.js?meteor_js_resource=true:90:28323)
at n (https://a.buzzy.buzz/48150624d89ccc80e05c24498fa367609400db5f.js?meteor_js_resource=true:90:19914)
4815062….js?meteor_js_resource=true:3 Exception from Tracker recompute function:
4815062….js?meteor_js_resource=true:3 Error: Bad index in range.getMember: 9
at t.getMember (4815062….js?meteor_js_resource=true:90)
at 4815062….js?meteor_js_resource=true:90
at Object.o.nonreactive (4815062….js?meteor_js_resource=true:34)
at Object.changedAt (4815062….js?meteor_js_resource=true:90)
at 4815062….js?meteor_js_resource=true:86
at Function.A.each.A.forEach (4815062….js?meteor_js_resource=true:1)
at l (4815062….js?meteor_js_resource=true:86)
at 4815062….js?meteor_js_resource=true:86
at Object.o.nonreactive (4815062….js?meteor_js_resource=true:34)
at 4815062….js?meteor_js_resource=true:86