Skip to content

Commit 05efb57

Browse files
committed
fix(cdk/observers): logs "ResizeObserver loop limit exceeded" errors
1 parent 02c668c commit 05efb57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cdk/observers/private/shared-resize-observer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {filter, shareReplay, takeUntil} from 'rxjs/operators';
1515
* @param e The error
1616
*/
1717
const loopLimitExceededErrorHandler = (e: unknown) => {
18-
if (e instanceof Error && e.message === 'ResizeObserver loop limit exceeded') {
18+
if (e instanceof ErrorEvent && e.message === 'ResizeObserver loop limit exceeded') {
1919
console.error(
2020
`${e.message}. This could indicate a performance issue with your app. See https://github.com/WICG/resize-observer/blob/master/explainer.md#error-handling`,
2121
);

0 commit comments

Comments
 (0)