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 коммит произвёл Facebook Github Bot
Родитель e3d3533bc5
Коммит e8087eccdb
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -130,12 +130,11 @@ if (__DEV__) {
} }
}; };
function registerWarning(...args): void { const registerWarning = (...args): void => {
YellowBoxRegistry.add({args, framesToPop: 2}); YellowBoxRegistry.add({args, framesToPop: 2});
} };
} else { } else {
// eslint-disable-next-line no-shadow YellowBox = class extends React.Component<Props> {
YellowBox = class YellowBox extends React.Component<Props> {
static ignoreWarnings(patterns: $ReadOnlyArray<string>): void { static ignoreWarnings(patterns: $ReadOnlyArray<string>): void {
// Do nothing. // Do nothing.
} }