Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cannot assign to read only property 'product' of object '#<WorkerNavi…
Summary: When running in strict mode we run into the following error: “Cannot assign to read only property 'product' of object '#<WorkerNavigator>’” Moreover navigator.product = ‘ReactNative’; didn’t actually change the product value. Without strict mode this was silently ignored. By using our defineProperty function we are able to run in strict mode and now navigator.product is really ReactNative. See facebook#10881 for more information --------------- Long story short - if we run in strict mode, the current code throws an error : `Cannot assign to read only property 'product' of object '#<WorkerNavigator>' initializeCore.js` (the current version of initializeCore.js doesn't have 'use strict'; on top, but if you are unfortunate enough to have a babel module that ads this for you, you are guaranteed to run into this. Moreover our contributing guidelines say that we should have 'use strict'; https://github.com/facebook/react-native/blob/master/CONTRIB Closes facebook#11057 Differential Revision: D4219958 Pulled By: javache fbshipit-source-id: 35568b2ce4b87fff1aa8248f067d49e5f9f9e9a2
- Loading branch information