Change Nullable usage (#13793)

This commit is contained in:
Ron Green
2020-10-19 10:38:48 +05:00
committed by GitHub
parent 67bdf7292d
commit 2e0b51d970
@@ -1793,8 +1793,8 @@ namespace Microsoft.PowerShell.Commands
private void WriteProgress(string statusDescription, int? percentComplete, int? secondsRemaining)
{
ProgressRecordType recordType;
if (secondsRemaining.HasValue && secondsRemaining.Value == 0 &&
percentComplete.HasValue && percentComplete.Value == 100)
if (secondsRemaining.HasValue && secondsRemaining.GetValueOrDefault() == 0 &&
percentComplete.HasValue && percentComplete.GetValueOrDefault() == 100)
{
recordType = ProgressRecordType.Completed;
}