Skip to content

Commit

Permalink
Fixed UpdateInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Aragas committed Apr 12, 2024
1 parent 4e91cf8 commit 5dca8d9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Bannerlord.ModuleManager.Models/ModuleInfoExtended.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ record ModuleInfoExtended
//
var url = moduleNode?.SelectSingleNode("Url")?.Attributes?["value"]?.InnerText ?? string.Empty;

var updateInfoProvider = moduleNode?.SelectSingleNode("UpdateInfo")?.Attributes?["provider"]?.InnerText ?? string.Empty;
var updateInfoValue = moduleNode?.SelectSingleNode("UpdateInfo")?.Attributes?["value"]?.InnerText ?? string.Empty;
var updateInfo = moduleNode?.SelectSingleNode("UpdateInfo")?.Attributes?["value"]?.InnerText ?? string.Empty;

var dependentModuleMetadatasNode = moduleNode?.SelectSingleNode("DependedModuleMetadatas");
var dependentModuleMetadatasList = dependentModuleMetadatasNode?.SelectNodes("DependedModuleMetadata");
Expand Down Expand Up @@ -268,7 +267,7 @@ record ModuleInfoExtended
ModulesToLoadAfterThis = modulesToLoadAfterThis,
IncompatibleModules = incompatibleModules,
Url = url,
UpdateInfo = !string.IsNullOrEmpty(updateInfoProvider) && !string.IsNullOrEmpty(updateInfoValue) ? $"{updateInfoProvider}:{updateInfoValue}" : string.Empty,
UpdateInfo = !string.IsNullOrEmpty(updateInfo) ? updateInfo : string.Empty,
DependentModuleMetadatas = dependentModuleMetadatas
};
}
Expand Down

0 comments on commit 5dca8d9

Please sign in to comment.