bowser-js / bowser

a browser detector
Other
5.44k stars 484 forks source link

Fix compatibility with Next.js middleware #516

Closed connor-baer closed 7 months ago

connor-baer commented 2 years ago

Fixes #512.

zeckdude commented 1 year ago

@lancedikson @voronianski Can we get this merged please? We rely heavily on your package in multiple places and would really love for our browser parsing to be the same in the Next.js middleware.

zeckdude commented 1 year ago

@connor-baer Thanks for the fix! I forked it and tested it and it looks like your solution needs to be applied on 4 more areas in the parser.js file where the instanceOf method is being used cause those are still currently not realizing that the test is an array.

@voronianski You may want to request changes so that gets addressed before merging.

connor-baer commented 1 year ago

Good catch, @zeckdude!

I think these code paths weren't reached in my testing, so the initial fix worked for my use case. Makes absolute sense to fix it everywhere though!

zeckdude commented 1 year ago

Vielen Dank!

bingoYB commented 1 year ago

I'm having the same problem, so when can this PR be merged.

mkkhedawat commented 1 year ago

Hey folks, I had forked https://github.com/mkkhedawat/frowser from this project recently given the inactivity from maintainer here. Would love to have this included in PR there if that is of interest.