Closed SachaG closed 8 years ago
It's not obvious to me why this would break FR, but I don't know exactly how it monkey patches publish..
I figured it out: to prevent this from happening, make sure you call Counts.publish
with the {noReady: true}
option.
(Cross-posted from https://github.com/percolatestudio/publish-counts/issues/80)
Basically, calling
Counts.publish()
inside a publication seems to be preventing FlowRouter from subscribing to that publication when performing SSR. As a result the collection is empty inside the FlowRouter SSR simulation.As soon as I comment out
Counts.publish()
, FlowRouter SSR finds the documents again.