Skip to content

Commit

Permalink
Swallow ResizeObserver error cross-browser
Browse files Browse the repository at this point in the history
  • Loading branch information
chandlerprall committed Apr 17, 2020
1 parent bca5d51 commit 9e6c609
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ window.canvasInitErrorHandler = () => {
// It is thrown during workpad loading due to layout thrashing
// https://stackoverflow.com/questions/49384120/resizeobserver-loop-limit-exceeded
// https://github.com/elastic/eui/issues/3346
console.log(message);
const isKnownError =
message === 'ResizeObserver loop limit exceeded' ||
message.includes('ResizeObserver loop') ||
Object.keys(knownErrors).find(errorName => {
return err.constructor.name === errorName || message.indexOf(errorName) >= 0;
});
Expand Down

0 comments on commit 9e6c609

Please sign in to comment.