Closed vdias38 closed 7 years ago
This issue only occurs on debug mode. Maybe because of uglify if debug is false. A discussion on eslint forum advices about this behaviour, only on Safari.
This can be fixed by changing the code to this: if (true) { const test = function() { } test(); }
This is a correct behavior in ES5. ES5 disallows function declarations on blocks (except function bodies). On the other hand, ES2015 (ES6) has relaxed this restriction. I'd like to recommend a use of no-inner-declarations rule. This rule would disallow such function declarations.
I've added the no-inner-declarations
rule on ng-meumobi-utils
On iOS, the app raises following error on launch:
SyntaxError: Strict mode does not allow function declarations in a lexically nested statement.
Following code, from
src/js/controllers/main_controller.js
is responsible for the exception: