Revert "Added a fix for api's with spaces in their names"
This reverts commit 98e96b15c7.
This commit is contained in:
parent
98e96b15c7
commit
af6009f1ac
1 changed files with 2 additions and 3 deletions
|
|
@ -19,9 +19,8 @@ export abstract class APIModel {
|
|||
abstract getById(id: string): Promise<MediaTypeModel>;
|
||||
|
||||
hasType(type: MediaType): boolean {
|
||||
const sanitizedApiName = this.apiName.replace(/\s+/g, '_');
|
||||
const disabledMediaTypes = (this.plugin.settings[`${sanitizedApiName}_disabledMediaTypes` as keyof typeof this.plugin.settings] as MediaType[]) || [];
|
||||
return (this.types || []).includes(type) && !disabledMediaTypes.includes(type);
|
||||
const disabledMediaTypes = this.plugin.settings[`${this.apiName}_disabledMediaTypes` as keyof typeof this.plugin.settings] as MediaType[];
|
||||
return this.types.includes(type) && !disabledMediaTypes.includes(type);
|
||||
}
|
||||
|
||||
hasTypeOverlap(types: MediaType[]): boolean {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue