Fix an issue on web where repositories plugin options were merged with base one

This commit is contained in:
lowlighter
2021-08-19 21:07:42 +02:00
parent 5d43b985be
commit c9a1ef7102

View File

@@ -216,7 +216,7 @@
const enabled = Object.entries(this.plugins.enabled).filter(([key, value]) => (value) && (key !== "base")).map(([key, value]) => key) const enabled = Object.entries(this.plugins.enabled).filter(([key, value]) => (value) && (key !== "base")).map(([key, value]) => key)
const filter = new RegExp(`^(?:${enabled.join("|")})[.]`) const filter = new RegExp(`^(?:${enabled.join("|")})[.]`)
//Search related options //Search related options
const entries = Object.entries(this.plugins.options.descriptions).filter(([key, value]) => filter.test(key)) const entries = Object.entries(this.plugins.options.descriptions).filter(([key, value]) => (filter.test(key)) && (!(key in metadata.base.web)))
entries.push(...enabled.map(key => [key, this.plugins.descriptions[key]])) entries.push(...enabled.map(key => [key, this.plugins.descriptions[key]]))
entries.sort((a, b) => a[0].localeCompare(b[0])) entries.sort((a, b) => a[0].localeCompare(b[0]))
//Return object //Return object