mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
fix babel 'strict mode' error
Summary: need to remove function declaration in a lexically nested statement because babel uses 'use strict' by default now Closes https://github.com/facebook/react-native/pull/11390 Differential Revision: D4308275 fbshipit-source-id: 0d073361d25b23fb67f001225feb72532af38683
This commit is contained in:
committed by
Mike Grabowski
parent
35fb7a9404
commit
1c44c908b2
@@ -109,7 +109,7 @@ require('RCTLog');
|
||||
|
||||
// Set up error handler
|
||||
if (!global.__fbDisableExceptionsManager) {
|
||||
function handleError(e, isFatal) {
|
||||
const handleError = (e, isFatal) => {
|
||||
try {
|
||||
ExceptionsManager.handleException(e, isFatal);
|
||||
} catch (ee) {
|
||||
@@ -118,7 +118,7 @@ if (!global.__fbDisableExceptionsManager) {
|
||||
/* eslint-enable no-console-disallow */
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const ErrorUtils = require('ErrorUtils');
|
||||
ErrorUtils.setGlobalHandler(handleError);
|
||||
|
||||
Reference in New Issue
Block a user