auto-git:

[add] dist/assets/index-CQocmVDK.js
 [change] dist/index.html
 [change] src/websearchEngines.js
 [unlink] dist/assets/index-BlgdGsnZ.js
This commit is contained in:
2026-03-20 12:56:26 +01:00
parent 645190405f
commit cbe50e998d
3 changed files with 31 additions and 24 deletions

View File

@@ -60,7 +60,14 @@ export function loadStoredWebsearchEngines(rawValue) {
try {
const parsed = JSON.parse(rawValue)
return normalizeWebsearchEngines(parsed)
if (!Array.isArray(parsed)) return [...DEFAULT_WEBSEARCH_ENGINES]
const normalized = normalizeWebsearchEngines(parsed)
if (parsed.length > 0 && normalized.length === 0) {
return [...DEFAULT_WEBSEARCH_ENGINES]
}
return normalized
} catch {
return [...DEFAULT_WEBSEARCH_ENGINES]
}