Skip to content

Commit 8d64bfa

Browse files
committed
prevent null
1 parent 348b1e5 commit 8d64bfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GitVersionCore/Helpers/JsonSerializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ public static string Serialize(object obj)
2828
return builder.ToString();
2929
}
3030

31-
private static bool NotAPaddedNumber(string value) => value == "0" || !value.StartsWith("0");
31+
private static bool NotAPaddedNumber(string value) => value != null && (value == "0" || !value.StartsWith("0"));
3232
}
3333
}

0 commit comments

Comments
 (0)