Closed echatzief closed 2 years ago
Hey @echatzief - What bug does this PR fix?
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? getNavigator()
(or any other suitable name) instead of copy pasting this line over and over.
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: