Meteor development, because of the asynchronous principle, when calling a third-party interface, the following code cannot get the value of the previous code. How to solve it?

  node.js, question

At present, the development with meteor and ng2 has encountered many problems. I think most of it is because of asynchrony. When meteor and the third-party interface call each other, the code is not executed in synchronous order, causing problems. The details are as follows

import {Component, View} from 'angular2/core';
 import {Statuslist} from 'collections/Statuslist';
 import {RouterLink,RouteParams,Router} from 'angular2/router';
 selector: 'status-list'
 templateUrl: '/client/tpl/main.html',
 directives: [ RouterLink]
 export class Main {
 chlidren: Mongo.Cursor<Object>;
 constructor(params: RouteParams,private _router: Router) {
 var sid = params.get('sid');  //Obtain site id according to parameter sid
 if(!  Sid){// if sid is 0
 var tmp = Statuslist.findOne();
 // console.log(tmp);  This is undefined. I think it may be asynchronous
 sid = tmp.sid;
 this.chlidren = Statuslist.findOne({fid:sid});



The logic of my business is to display a sub-site under the site according to the parameter sid.
When sid is 0, I will look for a site casually to show the subsites.

I found that when sid is 0, it may be because nodejs is asynchronous. last sentence

this.chlidren = Statuslist.findOne({fid:sid});

Inside’s sid has not been reassigned, it is still 0, and tmp output is undefined.
At the same time, html will also report an error, saying undefined does not have sname
How should I deal with this situation? Let chlidren get the correct data?

Try putting that code in autorun inside?