Closed Dielz98 closed 8 years ago
Can you provide a reproduction? A lot of things could be happening hear and it's hard to see without any code.
In general, everything runs in a fiber, so the query should complete before the http request is fully returned. If you're specifying the data directly (as opposed to with a function), it's possible a web request could squeeze in before the inject command has registered the data, but that should only be when first loading up.
Sorry I guess it's my fault
I put injection inside Meteor.onConnection so i guess it's too late since injection do before onConection
Great! Thanks for reporting back!
When I did mongodb query to get the data for initial inject, it fail to inject. It succeed to inject in second load.
I suspect it is due to mongodb query takes time. When it late, so nothing to inject