修复白名单未初始化启动失败的问题

This commit is contained in:
sickle committed 2025-08-07 20:38:48 +08:00
1 parent 65234d54d9
commit 00c9d1bdcb
1 file changed
+1 -1
+1 -1
View File
@@ -23,7 +23,7 @@ async function initSettings() {
hostname = window.location.hostname.toLowerCase();
dynamicScanEnabled = result.dynamicScan === true;
deepScanEnabled = result.deepScan === true;
isWhitelisted = result.customWhitelist.some(domain => hostname === domain || hostname.endsWith(`.${domain}`));
isWhitelisted = result.customWhitelist?.some(domain => hostname === domain || hostname.endsWith(`.${domain}`));
chrome.runtime.sendMessage({ type: 'REGISTER_CONTENT', from: 'content', to: 'background' }, (response) => {
if(isWhitelisted) return;
tabJs = response.tabJs;