pqina / filepond-plugin-image-preview

🖼 Show a preview for images dropped on FilePond
https://pqina.nl/filepond
MIT License
46 stars 26 forks source link

Fixing conditional bug for browser detection. #68

Closed zbarakzai closed 8 months ago

zbarakzai commented 1 year ago

The problem lies in the if condition that checks firefoxVersion <= 58. If isFirefox is null, meaning the user agent does not match Firefox, then firefoxVersion will be set to null, and the condition null <= 58 will always be false, causing the function to return false even for non-Firefox browsers.

The bug has been resolved by adding a check for both firefoxVersion !== null && firefoxVersion <= 58.

rikschennink commented 8 months ago

Thank you, and sorry this took so long.