File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -514,8 +514,8 @@ public function getFunctions(): array
514514 if ($ property ['type ' ] === 'array ' ) {
515515 $ arraySource = $ required
516516 ? "((IEnumerable<object>) {$ mapAccess }) "
517- : "( {$ v } as IEnumerable<object>) " ;
518- return "{$ arraySource }? .Select(it => {$ subSchema }.From(map: (Dictionary<string, object>)it)).ToList()! " ;
517+ : "( {$ v } as IEnumerable<object>)? " ;
518+ return "{$ arraySource }.Select(it => {$ subSchema }.From(map: (Dictionary<string, object>)it)).ToList() " ;
519519 } else {
520520 if ($ required ) {
521521 return "{$ subSchema }.From(map: (Dictionary<string, object>) {$ mapAccess }) " ;
@@ -541,7 +541,7 @@ public function getFunctions(): array
541541 $ src = $ required ? $ mapAccess : $ v ;
542542 $ arraySource = $ required
543543 ? "((IEnumerable<object>) {$ src }) "
544- : "( {$ src } as IEnumerable<object>) " ;
544+ : "( {$ src } as IEnumerable<object>)? " ;
545545
546546 $ selectExpression = match ($ itemsType ) {
547547 'string ' => 'x.ToString() ' ,
@@ -551,7 +551,7 @@ public function getFunctions(): array
551551 default => 'x '
552552 };
553553
554- return "{$ arraySource }? .Select(x => {$ selectExpression }).ToList()! " ;
554+ return "{$ arraySource }.Select(x => {$ selectExpression }).ToList() " ;
555555 }
556556
557557 // Handle integer/number
You can’t perform that action at this time.
0 commit comments