Prevent page crash on console.error being used with non-string values

pull/7606/head
Bogdan 4 weeks ago committed by Mark McDowall
parent 970df1a1d8
commit 963395b969

@ -23,12 +23,13 @@ const error = console.error;
function logError(...parameters: any[]) {
const filter = parameters.find((parameter) => {
return (
parameter.includes(
typeof parameter === 'string' &&
(parameter.includes(
'Support for defaultProps will be removed from function components in a future major release'
) ||
parameter.includes(
'findDOMNode is deprecated and will be removed in the next major release'
)
parameter.includes(
'findDOMNode is deprecated and will be removed in the next major release'
))
);
});

Loading…
Cancel
Save