File tree Expand file tree Collapse file tree
src/NuGetGallery.Core/Frameworks
tests/NuGetGallery.Core.Facts/Frameworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ public static class NuGetFrameworkExtensions
1111 {
1212 public static string GetBadgeVersion ( this NuGetFramework framework )
1313 {
14+ if ( framework . Version == FrameworkConstants . EmptyVersion )
15+ {
16+ return string . Empty ;
17+ }
18+
1419 var builder = new StringBuilder ( ) ;
1520 builder . Append ( framework . Version . Major ) ;
1621 builder . Append ( "." ) ;
Original file line number Diff line number Diff line change @@ -9,8 +9,10 @@ namespace NuGetGallery.Frameworks
99 public class NuGetFrameworkExtensionsFacts
1010 {
1111 [ Theory ]
12- [ InlineData ( "" , "0.0" ) ]
13- [ InlineData ( "0" , "0.0" ) ]
12+ [ InlineData ( "" , "" ) ]
13+ [ InlineData ( "0" , "" ) ]
14+ [ InlineData ( "00" , "" ) ]
15+ [ InlineData ( "0.0.0.0" , "" ) ]
1416 [ InlineData ( "1" , "1.0" ) ]
1517 [ InlineData ( "01" , "0.1" ) ]
1618 [ InlineData ( "12" , "1.2" ) ]
You can’t perform that action at this time.
0 commit comments