Open
Description
Describe the bug
I have a function which calls an async anonymous function. Everything is fine in development but in production the relevant code is lost.
My code:
getPOIInformation = (index) => {
const activePOIObject = pois[this.state.activePOIIndex];
const properties = activePOIObject.geojson.features[index].properties;
console.log(properties);
if (!properties.additionalInformation) {
properties.additionalInformation = "LOADING";
(async function () {
const response = await api.getPoiInformation({ type: properties.osmType, id: properties.id });
properties.additionalInformation = response;
this.forceUpdate();
}).bind(this)();
}
return properties.additionalInformation;
}
Code after run build:
a.getPOIInformation = function (e) {
var t = qe[a.state.activePOIIndex].geojson.features[e].properties;
return console.log(t),
t.additionalInformation || (t.additionalInformation = "LOADING"),
t.additionalInformation
}
I think there is something in the webpack/babel configuration wrong.