test.b // undefined
then expand the
test object in the console and you will see it contains
b=12 even though it was logged before
Try replacing your code with
and you will see that
slideGeneratorAppId doesn’t exist at that point in the code.
You said that the APPID is fetched from another server and so the response will probably not be available by the time the
onCreated function is called. Whatever you are doing with the
senseConfig.slideGeneratorAppId variable, you need to do it within the callback of
Meteor.call('getAppIDs'... so you can be sure it’s ready.
Alternatively, make sure
senseConfig is reactive then put your
onCreated code into an
autorun which checks for the existence of
senseConfig.slideGeneratorAppId before doing anything with it, then stops the autorun.