Skip to content

Commit 5897e4b

Browse files
authored
fix: SchemaComponentsMap bindings (#1390)
* fix: SchemaComponentsMap bindings * chore: format fix * chore: add changest
1 parent 8e60009 commit 5897e4b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/itchy-owls-beg.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"swagger-typescript-api": patch
3+
---
4+
5+
Fix being able to call getComponentByRef from templates

src/schema-components-map.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ export class SchemaComponentsMap {
6565
);
6666
}
6767

68-
get($ref: string) {
68+
get = ($ref: string) => {
6969
return this._data.find((c) => c.$ref === $ref) || null;
70-
}
70+
};
7171

7272
// Ensure enums are at the top of components list
7373
enumsFirst() {

0 commit comments

Comments
 (0)