[ci] format

This commit is contained in:
hippotastic 2022-06-30 12:12:27 +00:00 committed by fredkbot
parent b934ab5d86
commit 40fa87c274

View file

@ -51,9 +51,9 @@ function renderToStaticMarkup(Component, props, { default: children, ...slotted
/** /**
* Reduces console noise by filtering known non-problematic errors. * Reduces console noise by filtering known non-problematic errors.
* *
* Performs reference counting to allow parallel usage from async code. * Performs reference counting to allow parallel usage from async code.
* *
* To stop filtering, please ensure that there always is a matching call * To stop filtering, please ensure that there always is a matching call
* to `finishUsingConsoleFilter` afterwards. * to `finishUsingConsoleFilter` afterwards.
*/ */
@ -87,7 +87,7 @@ function finishUsingConsoleFilter() {
/** /**
* Hook/wrapper function for the global `console.error` function. * Hook/wrapper function for the global `console.error` function.
* *
* Ignores known non-problematic errors while any code is using the console filter. * Ignores known non-problematic errors while any code is using the console filter.
* Otherwise, simply forwards all arguments to the original function. * Otherwise, simply forwards all arguments to the original function.
*/ */
@ -99,8 +99,7 @@ function filteredConsoleError(msg, ...rest) {
const isKnownReactHookError = const isKnownReactHookError =
msg.includes('Warning: Invalid hook call.') && msg.includes('Warning: Invalid hook call.') &&
msg.includes('https://reactjs.org/link/invalid-hook-call'); msg.includes('https://reactjs.org/link/invalid-hook-call');
if (isKnownReactHookError) if (isKnownReactHookError) return;
return;
} }
originalConsoleError(msg, ...rest); originalConsoleError(msg, ...rest);
} }