Hi guys,

Okay, I found what's going on. Calling the "emit" function passes the
object's reference, so if I alter the object afterwards, the emited value
gets altered with it. I fixed it by changing
emit([doc.monitorID, doc.LocDateTime], subDateTime);
to
emit([doc.monitorID, doc.LocDateTime], eval(uneval(subDateTime)));
which seems to work.

This does leave me with a question: is this intended behavior? If so, maybe
it should at least be mentioned in the docs?

Thanks
Tim

Reply via email to