inversify-logger-middleware
inversify-logger-middleware copied to clipboard
Support React Native
Support React Native
Description
_global in utils.ts is undefined on React Native(Android)
This bring TypeError at _global.window
Motivation and Context
React Native app isn't runnable if request something from conatiner when app start up (will encounter TypeError when start up).
How Has This Been Tested
- app work normally after this change.
yarn testpassed
Types of changes
- [ ] Docs change / refactoring / dependency upgrade
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the CONTRIBUTING document.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.