Affects Version/s: Release 8.0.2, Release 8.1.0, Release 8.2.0
Fix Version/s: None
SDK: 8.0.2.GA, 8.1.0.v20190726095146, 8.2.0.v20190725161133
When using a for loop in the top level scope (i.e. not in a function) of an app.js or alloy.js file if the variable declaration used is a block scoped variable (const/let) the below error will be thrown. This is because we try to use add the level to the global scope, but as it is block scope we can't reference it outside of the for loop.
workaround: Use var to declare the variable, or move the code into a function and call that.
Note: I believe by default this will only be seen on Android as babel will convert const/let to var on iOS
1. Add the below code to your app.js
2. Build to android
App will crash with above error
App should not crash