Logging rides alerts, logging users doesn’t.
I can’t figure out what’s going on here… There’s no network errors. Both data/users.json and data/rides.json are reaching the client fine.
$.ajax({
url: "data/users.json",
dataType: 'json',
async: false,
success: function(data){
users = data.users
alert('Logging Uers');
}});
$.ajax({
url: "data/rides.json",
dataType: 'json',
async: false,
success: function(data){
alert('Logging rides');
rides = data.rides
}});
Maybe
users = data.usersit’s throwing an exception (caused by a possibly undefineddata). Did you tried to comment that line?Also, you should implement an error callback: