-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
userAgent Bug #281
userAgent Bug #281
Conversation
When you use it for Node.js the API breaks when you define userAgent globally
Hey @echatzief - What bug does this PR fix? |
The module is used at the strapi-provider-upload-cloudinary and the navigator is globally defined. Thus, using the library with node.js the navigator breaks (because it's not defined) and throws error to the above plugin. So, you must define the userAgent inside each function not globally. |
Thanks, sounds like the right approach. We'd like to avoid this code duplication though, can you please move the navigator line to a function? |
Added a function that returns the navigator
Almost done here, please move it to the top of the file and we're good to merge. |
Brief Summary of Changes
What does this PR address?
Are tests included?
Reviewer, Please Note: