Skip to content

Commit af6009f

Browse files
committed
Revert "Added a fix for api's with spaces in their names"
This reverts commit 98e96b1.
1 parent 98e96b1 commit af6009f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/api/APIModel.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ export abstract class APIModel {
1919
abstract getById(id: string): Promise<MediaTypeModel>;
2020

2121
hasType(type: MediaType): boolean {
22-
const sanitizedApiName = this.apiName.replace(/\s+/g, '_');
23-
const disabledMediaTypes = (this.plugin.settings[`${sanitizedApiName}_disabledMediaTypes` as keyof typeof this.plugin.settings] as MediaType[]) || [];
24-
return (this.types || []).includes(type) && !disabledMediaTypes.includes(type);
22+
const disabledMediaTypes = this.plugin.settings[`${this.apiName}_disabledMediaTypes` as keyof typeof this.plugin.settings] as MediaType[];
23+
return this.types.includes(type) && !disabledMediaTypes.includes(type);
2524
}
2625

2726
hasTypeOverlap(types: MediaType[]): boolean {

0 commit comments

Comments
 (0)