Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Cannot read property 'userAgent' of undefined #97

Closed
pld000 opened this issue Jan 8, 2018 · 0 comments
Closed

Cannot read property 'userAgent' of undefined #97

pld000 opened this issue Jan 8, 2018 · 0 comments
Labels

Comments

@pld000
Copy link

pld000 commented Jan 8, 2018

Hi there!
I encountered a problem when webpack processes application.
In react-image-lightbox/dist/main.js I found next code
function getIEVersion() { if ("undefined" != typeof window) { var match = window.navigator.userAgent.match(/(?:MSIE |Trident\/.*; rv:)(\d+)/); return match ? parseInt(match[1], 10) : void 0; } }

As I understand window.navigator maybe undefined, and necessary to add checking for this.

@fritz-c fritz-c added the bug label Jan 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants