Skip to content

Commit

Permalink
#73 exit early from field renderer when we have an empty value
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicWatson committed Jul 26, 2023
1 parent 1b78b5f commit 367497d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services/DataApiService.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ component {
return $isFeatureEnabled( "dataApiUseNullForStrings" ) ? NullValue() : "";
}

if ( !Len( arguments.value ?: "" ) ) {
return $isFeatureEnabled( "dataApiUseNullForStrings" ) ? NullValue() : "";
}

if ( $getContentRendererService().rendererExists( renderer, "dataapi" ) ) {
try {
var renderedContent = $renderContent( renderer, arguments.value, "dataapi", arguments.fieldSettings );
Expand Down

0 comments on commit 367497d

Please sign in to comment.