Update cypress/platform/viewer.js

Co-authored-by: Alois Klink <alois@aloisklink.com>
This commit is contained in:
Saurabh Gore
2025-02-26 18:48:27 +05:30
committed by GitHub
parent 050fbd9da2
commit 06877dcc47

View File

@@ -33,12 +33,8 @@ function loadFontAwesomeCSS() {
* page.
*/
const contentLoaded = async function () {
try {
await loadFontAwesomeCSS();
await Promise.all(Array.from(document.fonts, (font) => font.load()));
} catch (error) {
console.error('Error loading fonts', error);
}
await loadFontAwesomeCSS();
await Promise.all(Array.from(document.fonts, (font) => font.load()));
let pos = document.location.href.indexOf('?graph=');
if (pos > 0) {