YellowBox: Restore ES5 Compatibility

Reviewed By: sahrens

Differential Revision: D8421561

fbshipit-source-id: c2b8d430f4d0c9ce0d5177f0af5eb5f404916024
This commit is contained in:
Tim Yung authored and Facebook Github Bot committed 2018-06-14 09:02:18 -07:00
1 parent e3d3533bc5
commit e8087eccdb
1 file changed
+3 -4
+3 -4
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.
}