Skip to content

Commit

Permalink
fix(cdk/observers): logs "ResizeObserver loop limit exceeded" errors (#…
Browse files Browse the repository at this point in the history
…29036)

(cherry picked from commit 37958ef)
  • Loading branch information
enten authored and crisbeto committed May 13, 2024
1 parent 0b30688 commit ba8137d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cdk/observers/private/shared-resize-observer.ts
Original file line number Diff line number Diff line change
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 ba8137d

Please sign in to comment.