This repository demonstrates an issue with Mongo 1.14.1.
Adding a new field to a document, with the following shape
foo: { bar: [1, 2, 3] }
results in the published bar
array being converted to an object (on the client-side).
This issue occurs if the method is executed just server-side or also if the method is executed client-side. In this example app, the method is a server-side method.
Please run this app using the meteor run
command. If you need to reset the database then run meteor reset
.
The method that updates the collection is in the main.js
file.