Skip to content

Commit

Permalink
fix(cdk/observers): logs "ResizeObserver loop limit exceeded" errors (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
enten committed May 13, 2024
1 parent d770e6c commit 37958ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cdk/observers/private/shared-resize-observer.ts
Expand Up @@ -15,7 +15,7 @@ import {filter, shareReplay, takeUntil} from 'rxjs/operators';
* @param e The error
*/
const loopLimitExceededErrorHandler = (e: unknown) => {
if (e instanceof Error && e.message === 'ResizeObserver loop limit exceeded') {
if (e instanceof ErrorEvent && e.message === 'ResizeObserver loop limit exceeded') {
console.error(
`${e.message}. This could indicate a performance issue with your app. See https://github.com/WICG/resize-observer/blob/master/explainer.md#error-handling`,
);
Expand Down

0 comments on commit 37958ef

Please sign in to comment.