unsupport to use Object.defineProperty to change the 'name' of a function.
See original GitHub issueEnvironment
Environment: OS: macOS High Sierra 10.13.4 Node: 8.4.0 Yarn: 1.3.2 npm: 6.0.0 Watchman: 4.9.0 Xcode: Xcode 9.3 Build version 9E145 Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed) react: 16.3.1 => 16.3.1 react-native: 0.55.4 => 0.55.4
Description
Cannot change the name of anonymous function; like this:
function _genSynMethod(moduleName, methodName) {
return Object.defineProperty(
function () {
...
}, 'name', {value:methodName}) ;
}
Steps to Reproduce
just call function _genSynMethod
Expected Behavior
running normal , just like iOS.
Actual Behavior
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Object.defineProperty() - JavaScript - MDN Web Docs
When the property is accessed, this function is called without arguments and with this set to the object through which the property is...
Read more >How to change Javascript function name that appears in ...
@Pointy - You can't update it (assign to it), but as the OP said, you can redefine it with defineProperty . But that...
Read more >feeling alone and unsupported during pregnancy - Synergex
Object.defineProperties:function(t,e){a(t);for(var r,n=u(e),o=c(e) ... .exports=function(t){if("object"==typeof t||n(t))return t;throw i("Can't set "+o(t)+" ...
Read more >Unsupported JavaScript functions and alternatives
Use the following JavaScript to return a new array iterator object that enables you to iterate through the key/value pairs in the array....
Read more >JSDoc: Source: orasocket.js
changeHandler; //Reset the getter and setter Object.defineProperty(subject, property, { get: function () { return this.value; }, set: function (newValue) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This will likely be fixed once we move on from the old JSC used in Android: https://github.com/facebook/react-native/issues/19737
0.59 is now out. If anyone happens to verify this on 0.59 and it’s still an issue, please let us know.