Fixed the WIP sub object code
This commit is contained in:
parent
139cf8388c
commit
9bc3bea90d
2 changed files with 48 additions and 44 deletions
|
|
@ -20,7 +20,7 @@ export abstract class APIModel {
|
|||
abstract getById(id: string): Promise<MediaTypeModel>;
|
||||
|
||||
hasType(type: MediaType): boolean {
|
||||
if (this.types.contains(type) && !(this.plugin.settings[((`${this.apiName}"."${type}`)) as keyof MediaDbPluginSettings] === false)) {
|
||||
if (this.types.contains(type) && (Boolean((this.plugin.settings.apiToggle as any)?.[this.apiName]?.[type] as MediaDbPluginSettings) === true || (this.plugin.settings.apiToggle as any)?.[this.apiName]?.[type] as MediaDbPluginSettings === undefined)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue