summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/StardewModdingAPI.Toolkit/Serialisation/Converters/SemanticVersionConverter.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/StardewModdingAPI.Toolkit/Serialisation/Converters/SemanticVersionConverter.cs b/src/StardewModdingAPI.Toolkit/Serialisation/Converters/SemanticVersionConverter.cs
index 9b2f5e7d..39e990d5 100644
--- a/src/StardewModdingAPI.Toolkit/Serialisation/Converters/SemanticVersionConverter.cs
+++ b/src/StardewModdingAPI.Toolkit/Serialisation/Converters/SemanticVersionConverter.cs
@@ -24,7 +24,7 @@ namespace StardewModdingAPI.Toolkit.Serialisation.Converters
/// <param name="objectType">The object type.</param>
public override bool CanConvert(Type objectType)
{
- return typeof(ISemanticVersion).IsAssignableFrom(objectType);
+ return objectType == typeof(ISemanticVersion);
}
/// <summary>Reads the JSON representation of the object.</summary>
@@ -82,7 +82,7 @@ namespace StardewModdingAPI.Toolkit.Serialisation.Converters
return null;
if (!SemanticVersion.TryParse(str, out ISemanticVersion version))
throw new SParseException($"Can't parse semantic version from invalid value '{str}', should be formatted like 1.2, 1.2.30, or 1.2.30-beta (path: {path}).");
- return (SemanticVersion)version;
+ return version;
}
}
}