fix override exec duplicate

This commit is contained in:
pompurin404 2024-09-13 13:55:07 +08:00
parent f1ca8a5b7a
commit 9f5a39f652
No known key found for this signature in database

View File

@ -36,7 +36,7 @@ async function overrideProfile(
const { items = [] } = (await getOverrideConfig()) || {}
const globalOverride = items.filter((item) => item.global).map((item) => item.id)
const { override = [] } = (await getProfileItem(current)) || {}
for (const ov of globalOverride.concat(override)) {
for (const ov of new Set(globalOverride.concat(override))) {
const item = await getOverrideItem(ov)
const content = await getOverride(ov, item?.ext || 'js')
switch (item?.ext) {