mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-07-12 08:18:02 +08:00
fix: repeated mounting of dynamic pages
This commit is contained in:
@@ -25,7 +25,12 @@ import { changeLanguage } from 'i18next'
|
||||
*/
|
||||
async function mountComponent(siteConfig, userConfig) {
|
||||
const retry = 10
|
||||
let oldUrl = location.href
|
||||
for (let i = 1; i <= retry; i++) {
|
||||
if (location.href !== oldUrl) {
|
||||
console.log(`SiteAdapters Retry ${i}/${retry}: stop`)
|
||||
return
|
||||
}
|
||||
const e =
|
||||
(siteConfig &&
|
||||
(getPossibleElementByQuerySelector(siteConfig.sidebarContainerQuery) ||
|
||||
|
||||
Reference in New Issue
Block a user