mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Fix array option not updated
This commit is contained in:
parent
9960908cc7
commit
9b3c3576fc
@ -41,7 +41,13 @@ export const installComponent = async (code: string) => {
|
||||
const defaultSettings = componentToSettings(component)
|
||||
lodash.defaultsDeep(
|
||||
existingComponent.settings.options,
|
||||
lodash.pickBy(defaultSettings.options, value => !Array.isArray(value)),
|
||||
lodash.pickBy(defaultSettings.options, (value, key) => {
|
||||
const isArray = Array.isArray(value)
|
||||
if (isArray) {
|
||||
return lodash.get(existingComponent.settings.options, key) === undefined
|
||||
}
|
||||
return true
|
||||
}),
|
||||
)
|
||||
return {
|
||||
metadata: component,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user