@@ -404,21 +404,28 @@ public static void RegisterHandleBarsHelpers()
404
404
405
405
try
406
406
{
407
- var test = parameters [ 0 ] ;
407
+ var classificationsParameter = parameters [ 0 ] ;
408
408
409
- var classifications = JsonSerializer . Deserialize < List < DataClassification > > ( parameters [ 0 ] . ToString ( ) ?? string . Empty ) ;
410
- var classificationName = ( string ) parameters [ 1 ] ;
411
- var result = classifications ? . Find ( i => i . Classification . ToString ( ) . Equals ( classificationName , StringComparison . OrdinalIgnoreCase ) ) . Classification ;
412
-
413
- if ( result != null && result != "" )
409
+ if ( classificationsParameter . ToString ( ) == "classifications" )
414
410
{
415
- // Regular block, a classification has been found
416
- options . Template ( output , context ) ;
411
+ // Skip, it's really null.
417
412
}
418
413
else
419
414
{
420
- // Else block, no classification with the input name has been found.
421
- options . Inverse ( output , context ) ;
415
+ var classifications = JsonSerializer . Deserialize < List < DataClassification > > ( classificationsParameter . ToString ( ) ?? string . Empty ) ;
416
+ var classificationName = ( string ) parameters [ 1 ] ;
417
+ var result = classifications ? . Find ( i => i . Classification . ToString ( ) . Equals ( classificationName , StringComparison . OrdinalIgnoreCase ) ) . Classification ;
418
+
419
+ if ( result != null && result != "" )
420
+ {
421
+ // Regular block, a classification has been found
422
+ options . Template ( output , context ) ;
423
+ }
424
+ else
425
+ {
426
+ // Else block, no classification with the input name has been found.
427
+ options . Inverse ( output , context ) ;
428
+ }
422
429
}
423
430
}
424
431
catch ( Exception exception )
0 commit comments