ngx-scanner: Crashing entire app on IE and Edge
Describe the bug
When project is opened in IE11 or Edge it’s freezing on loading page. The error is at eval('BrowserCodeReader ...')
It happens only if ZXingScannerModule.forRoot()
was called. There is n way to even put a try catch there, because eval is happening in vendor, and even conditionally calling forRoot() is causing the issue e.g.
if(!isIEorEdge) {
imports.push(ZXingScannerModule.forRoot())
}
To Reproduce Steps to reproduce the behavior:
- Open project with plugin in IE11 or Edge
Expected behavior Throw an error that can be handled or show warning.
Desktop (please complete the following information):
- OS: Windows
- Browser IE-11 and Edge
- Version any
Smartphone (please complete the following information):
- Probably windows phone will cause the same, not tested
Additional context I know that this plugin is not supporting Edge and IE, but issue is not about support it’s about crashing entire app.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 34 (17 by maintainers)
Everyone makes mistakes, even ninjas. 🐱👤 (ninjacat Windows’s emoji)
I tested
1.1.1-dev.ca33ea
version and it worked on IE. Thanks for that. @Danieliverant just don’t forget to addimport 'core-js/es6/typed';
at polyfillsoh gah damn… Sorry this one’s mine… I thought I had all polyfills in place but i forgot
core-js/es6/typed
@Danieliverant https://www.npmjs.com/package/@zxing/ngx-scanner/v/1.1.1-dev.ca33ea
Not before you mentioned it, now I did and still same error. I guess it’s the import not the forRoot() that matters