From e8087eccdb65465d36bea483e208db526188e575 Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Thu, 14 Jun 2018 08:55:39 -0700 Subject: [PATCH] YellowBox: Restore ES5 Compatibility Reviewed By: sahrens Differential Revision: D8421561 fbshipit-source-id: c2b8d430f4d0c9ce0d5177f0af5eb5f404916024 --- Libraries/YellowBox/YellowBox.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Libraries/YellowBox/YellowBox.js b/Libraries/YellowBox/YellowBox.js index 10d8ba4a00..16d1b453cf 100644 --- a/Libraries/YellowBox/YellowBox.js +++ b/Libraries/YellowBox/YellowBox.js @@ -130,12 +130,11 @@ if (__DEV__) { } }; - function registerWarning(...args): void { + const registerWarning = (...args): void => { YellowBoxRegistry.add({args, framesToPop: 2}); - } + }; } else { - // eslint-disable-next-line no-shadow - YellowBox = class YellowBox extends React.Component { + YellowBox = class extends React.Component { static ignoreWarnings(patterns: $ReadOnlyArray): void { // Do nothing. }