When I run meteor build without --debug the following autorun gets stopped immediately. The only place I call the .stop() method is on the componentWillUnmount and I’ve tried removing that, or putting logs in so I know it’s not getting called from there. If I do a stack trace it’s completely unreadable, and this only happens when it’s minified.
componentWillMount () {
this.filterCollection = new Meteor.Collection(null);
this.trackerFilter = Tracker.autorun(() => {
const filter = this.filterCollection.find().map(({operator, value, tag }) => ({ tag, value, operator }));
this.setState({ filter });
});
}
I’ve ran out of ideas on how to debug this. Thanks in advance!
EDIT: New findings, same thing happens if I put it in componentDidMount instead of componentWillMount. But if I put it in a Meteor.defer the problem goes away.