From 54786493d7f238f04372b89ea9b66d4228bd7b73 Mon Sep 17 00:00:00 2001 From: Anton Karpov Date: Sun, 11 Dec 2016 00:28:29 -0800 Subject: [PATCH] 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 --- Libraries/Core/InitializeCore.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/Core/InitializeCore.js b/Libraries/Core/InitializeCore.js index 5195665fe64ba6..af8c053e02dec0 100644 --- a/Libraries/Core/InitializeCore.js +++ b/Libraries/Core/InitializeCore.js @@ -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);