From 0e30e15ff1b898d6ad44207e53e7b47cd7ca2bd2 Mon Sep 17 00:00:00 2001 From: tsm-odoo Date: Mon, 5 Jun 2023 09:50:51 +0000 Subject: [PATCH] [FIX] im_livechat: font face set not iterable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit fixes a traceback that occurs on the frontend on firefox only. The issue is that the `FontFaceSet.values()` return value is considered as non iterable while it is an iterator. This commit solves this issue by using directly `document.fonts` which is considered an iterator even by firefox. closes odoo/odoo#123672 See: https://bugzilla.mozilla.org/show_bug.cgi?id=1780657 Signed-off-by: Alexandre Kühn (aku) --- addons/im_livechat/static/src/embed/boot_helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/im_livechat/static/src/embed/boot_helpers.js b/addons/im_livechat/static/src/embed/boot_helpers.js index 1dbf2651e3f..bc2290ebcb3 100644 --- a/addons/im_livechat/static/src/embed/boot_helpers.js +++ b/addons/im_livechat/static/src/embed/boot_helpers.js @@ -4,7 +4,7 @@ import { serverUrl } from "@im_livechat/embed/livechat_data"; async function loadFontAwesome() { await document.fonts.ready; - if ([...document.fonts.values()].some(({ family }) => family === "FontAwesome")) { + if ([...document.fonts].some(({ family }) => family === "FontAwesome")) { // FontAwesome already loaded. return; }