YellowBox: Restore ES5 Compatibility

Reviewed By: sahrens

Differential Revision: D8421561

fbshipit-source-id: c2b8d430f4d0c9ce0d5177f0af5eb5f404916024
This commit is contained in:
Tim Yung
2018-06-14 08:55:39 -07:00
committed by Facebook Github Bot
parent e3d3533bc5
commit e8087eccdb

View File

@@ -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<Props> {
YellowBox = class extends React.Component<Props> {
static ignoreWarnings(patterns: $ReadOnlyArray<string>): void {
// Do nothing.
}