fix(lib/discord/modules/settings): return success status in registerSettingsItems unpatch fn
This commit is contained in:
parent
56a09807c7
commit
5e848a6c40
1 changed files with 3 additions and 1 deletions
|
|
@ -68,7 +68,9 @@ export function registerSettingsItem(key: string, item: SettingsItem) {
|
|||
export function registerSettingsItems(record: Record<string, SettingsItem>) {
|
||||
Object.assign(_data[1], record)
|
||||
return () => {
|
||||
for (const key in record) delete _data[1][key]
|
||||
let ret = true
|
||||
for (const key in record) ret &&= delete _data[1][key]
|
||||
return ret
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue