From 8e2e6fcce8b9aa4d25171b64cf5752005b5f66f0 Mon Sep 17 00:00:00 2001 From: Samuel Degueldre Date: Tue, 2 Mar 2021 15:04:00 +0000 Subject: [PATCH] [FIX] web: fix error-handling infinitely-looping on non-chrome browsers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The formatTraceback function relies on _t to add the error message to tracebacks, it was recently moved around while refactoring but it seems that its dependency was forgotten and not imported. This causes the attempt to call _t to crash, which will try to format the error, which will again try to call _t and crash, until the browser itself crashes. This commit fixes that issue by adding the required import. closes odoo/odoo#67079 Signed-off-by: Géry Debongnie (ged) --- addons/web/static/src/js/core/error_utils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web/static/src/js/core/error_utils.js b/addons/web/static/src/js/core/error_utils.js index 1c3e14fa01c..59c1bce1b2e 100644 --- a/addons/web/static/src/js/core/error_utils.js +++ b/addons/web/static/src/js/core/error_utils.js @@ -2,6 +2,7 @@ import { loadJS } from "web.ajax"; import BrowserDetection from "web.BrowserDetection"; +import { _t } from "web.core"; /** * Format the traceback of an error. Basically, we just add the error message * in the traceback if necessary (Chrome already does it by default, but not