From 5fe3209891bf0afa5004266319f45651dca817ee Mon Sep 17 00:00:00 2001 From: LaelLuo Date: Sat, 7 Dec 2024 11:07:44 +0800 Subject: [PATCH] Enhance URL validation in console logger to ensure URL object availability --- lib/log.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/log.js b/lib/log.js index 4ef700591..3c86b1348 100644 --- a/lib/log.js +++ b/lib/log.js @@ -298,7 +298,7 @@ if(typeof(console) !== 'undefined' && 'log' in console) { * that could otherwise be limited by a user config. */ if(sConsoleLogger !== null && - typeof window !== 'undefined' && window.location + typeof window !== 'undefined' && window.location && typeof URL !== 'undefined' ) { var query = new URL(window.location.href).searchParams; if(query.has('console.level')) {