Skip to content

Commit ce7b9f7

Browse files
committed
chore: fix dart firstOrNull
1 parent b445c01 commit ce7b9f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/cli/lib/type-generation/languages/dart.js.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class <%= toPascalCase(collection.name) %> {
7878
(map['<%= attribute.key %>'] as List<dynamic>?)?.map((e) => <%- toPascalCase(attribute.key) %>.values.firstWhere((element) => element.name == e)).toList()<% if (!attribute.required) { %> ?? []<% } -%>
7979
<% } else { -%>
8080
<% if (!attribute.required) { -%>
81-
map['<%= attribute.key %>'] != null ? <%- toPascalCase(attribute.key) %>.values.where((e) => e.name == map['<%= attribute.key %>']).firstOrNull() : null<% } else { -%>
81+
map['<%= attribute.key %>'] != null ? <%- toPascalCase(attribute.key) %>.values.where((e) => e.name == map['<%= attribute.key %>']).firstOrNull : null<% } else { -%>
8282
<%- toPascalCase(attribute.key) %>.values.firstWhere((e) => e.name == map['<%= attribute.key %>'])<% } -%>
8383
<% } -%>
8484
<% } else { -%>

0 commit comments

Comments
 (0)