Skip to content

Commit 7106d85

Browse files
committed
fix(Core): Fixed the WorkflowDefinitionEnumerableExtensions by using the SemVersio.PrecendenceComparer when ordering versions of a workflow
Fixes #454 Signed-off-by: Charles d'Avernas <[email protected]>
1 parent 40914e3 commit 7106d85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/Synapse.Core/Extensions/WorkflowDefinitionEnumerableExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static class WorkflowDefinitionEnumerableExtensions
2626
/// </summary>
2727
/// <param name="definitions">An <see cref="IEnumerable{T}"/> containing the <see cref="WorkflowDefinition"/>s to get the latest of</param>
2828
/// <returns>The latest <see cref="WorkflowDefinition"/></returns>
29-
public static WorkflowDefinition GetLatest(this IEnumerable<WorkflowDefinition> definitions) => definitions.OrderByDescending(wf => SemVersion.Parse(wf.Document.Version, SemVersionStyles.Strict)).First();
29+
public static WorkflowDefinition GetLatest(this IEnumerable<WorkflowDefinition> definitions) => definitions.OrderByDescending(wf => SemVersion.Parse(wf.Document.Version, SemVersionStyles.Strict), SemVersion.PrecedenceComparer).First();
3030

3131
/// <summary>
3232
/// Gets the specified <see cref="WorkflowDefinition"/> version

0 commit comments

Comments
 (0)