Yesterday i upgraded to 0.29.0, verified that the app worked and moved on working on it. When i start again today i all of a sudden get lots of XMLHttpRequest is not defined errors.
I am fairly sure that this worked yesterday when i stopped working on the app, and there have been no changes to the codebase from that point.
The error
OG: Error: JavaScript error in Main.js line 291: Name: ReferenceError: XMLHttpRequest is not defined
Error message: Uncaught ReferenceError: XMLHttpRequest is not defined
File name: Main.js
Line number: 291
Source line: var Request = new XMLHttpRequest();
JS stack trace: ReferenceError: XMLHttpRequest is not defined
at LoadMapMarkers (Main.js:291:21)
at LoadDealMap (Main.js:284:3)
at RouteToMain (Main.js:400:3)
at InitApp (Main.js:407:5)
at null._tempMethod (Main.js:415:1)
in Fuse.Reactive.JavaScript</usr/local/share/uno/Packages/Fuse.Reactive/0.40.8/$.uno:1445>
Code that flops:
function LoadMapMarkers(args){
var Request = new XMLHttpRequest();
Request.open("POST", MAPLIST_API_ENDPOINT, true);
Request.setRequestHeader("Content-Type", "application/json");
Request.setRequestHeader("Expect", "");
Request.onreadystatechange = function() {
if (Request.readyState == 4 && Request.status == 200) {
var Response = [JSON.parse(Request.responseText)];
if(Response){
MapMarkers.value = Response[0];
for (var i = 0; i < MapMarkers.value.Locations.length; i++) {
console.log(JSON.stringify(MapMarkers.value.Locations[i].Colour));
if(MapMarkers.value.Locations[i].Colour === "Blue"){
MapMarkers.value.Locations[i].Colour = "Point_Blue.png";
}
}
console.log(JSON.stringify(MapMarkers));
}
else if (resp.Error) {
}
}
}
Request.send('{"PartnerID":"123","Token":"123", "Lng" : "123", "Lat" : "123"}');
}
Running on a Mac Mini Late 2012 (2.4GHz i5, 4GB ram) with macOS Sierra (10.12.1)