refactor(SiteFile): Remove redundant if statement

remove if statement that returns the result of a boolean test.
This commit is contained in:
Robert Morrison 2024-03-29 14:10:28 +00:00
parent 585410bf51
commit 8717b1c677
Signed by: robert
GPG Key ID: 73E012EB3F4EC696

View File

@ -72,13 +72,9 @@ public partial class SiteFile
LoadMetadata(settings); LoadMetadata(settings);
} }
// NOTE: By this point Metadata CANNOT be null as LoadMetadata would either have loaded the JSON or instantiated MetaData // NOTE: By this point Metadata CANNOT be null as LoadMetadata would either have loaded the JSON or instantiated blank MetaData
if (Metadata!.GetValueOrDefault(info.FullName, DateTime.MinValue) == info.LastWriteTimeUtc) // The compiler however is unaware of this as it uses side effects, so we tell it there is no possible null value here.
{ return (Metadata!.GetValueOrDefault(info.FullName, DateTime.MinValue) == info.LastWriteTimeUtc);
return false;
}
return true;
} }