Closed diegodorazio closed 4 years ago
I also had the same problem and solved the same way. The error tells me visual studio when I start debugging. The test is done with Visual Studio 2015, Windows Server 2012 and IE11.
This also affects UglifyJS which throws an error
When including adal-angular.js on IE10 on Win 8.0, the browser issues a javascript error and fails to load the js file.
The error is: SCRIPT1047: In strict mode, function declarations cannot be nested inside a statement or block. They may only appear at the top level or directly inside a function body.
The offending bit of code (which was introduced in v1.0.16) is the following:
The 2 functions onStartStateChangeHandler and onErrorStateChangeHandler use a function declaration inside a code block, and this is not accepted by IE10 on Win 8.0 (see SCRIPT1047 error message above)
It would be quite simple to fix: just change those 2 functions from function declaration to function expression,, e.g.: