I’m porting existing js functions to apigee. One of the functions is constructed similar to what is shown below in the getRoles() which takes a function as a parameter
In the below function, when running on apigee nothing appears to be evaluated after var userX declaration. This function is skipped and the next is evaluated.
Is this a problem with the syntax or I need to refactor into seperate functions without nested declarations?
function build_my_stuff(config) {
var userN = "xxxxx";
var userP = "yyyyyy";
var device = "rrrrrrr";
var userX = "pppppT";
getRoles(userN, config, function(titles) {
var things = {
xyz : "GUESS",
tuv : userN,
rty : userP,
uio : device,
roles : titles,
attrs : { dev_id : device, user : userX }
};
dothis (things, config);
});
}