Skip to content

Commit 3c68e75

Browse files
Varadraj75Copilot
andauthored
Update src/generators/scala/ScalaConstrainer.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 985df44 commit 3c68e75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/generators/scala/ScalaConstrainer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const ScalaDefaultTypeMapping: ScalaTypeMapping = {
7878
return constrainedModel.name;
7979
},
8080
Reference({ constrainedModel }): string {
81-
if (constrainedModel.ref.constructor.name === 'ConstrainedEnumModel') {
81+
if (constrainedModel.ref instanceof ConstrainedEnumModel) {
8282
return `${constrainedModel.name}.Value`;
8383
}
8484
return constrainedModel.name;

0 commit comments

Comments
 (0)