From 9e6c609a90fe1410f62680851b6de341fdc037d1 Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Fri, 17 Apr 2020 13:56:20 -0600 Subject: [PATCH] Swallow ResizeObserver error cross-browser --- .../legacy/plugins/canvas/public/lib/window_error_handler.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/legacy/plugins/canvas/public/lib/window_error_handler.js b/x-pack/legacy/plugins/canvas/public/lib/window_error_handler.js index 0af00a0c31c83..75307816b4371 100644 --- a/x-pack/legacy/plugins/canvas/public/lib/window_error_handler.js +++ b/x-pack/legacy/plugins/canvas/public/lib/window_error_handler.js @@ -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; });