您的位置:首页 > 其它

rn:strict mode does not allow function declarations in a lexically nested statement

2017-02-20 16:28 507 查看
/node_modules/react-native/Libraries/Utilities/UIManager.js  

because babel now adds 'use strict' automatically so it checks function declarations in a lexically nested statement

修改成如下代码:

/**
* Copies the ViewManager constants and commands into UIManager. This is
* only needed for iOS, which puts the constants in the ViewManager
* namespace instead of UIManager, unlike Android.
*/
if (Platform.OS === 'ios') {
// Copied from NativeModules
var normalizePrefix = function(moduleName){
return moduleName.replace(/^(RCT|RK)/, '');
}
// function normalizePrefix(moduleName) {
//
// }
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐