fix: Get version without default fallback

This commit is contained in:
Ben Woo 2023-03-27 14:10:22 +08:00
parent 98fc0178aa
commit 624d5ad117
No known key found for this signature in database
GPG Key ID: FB2A3645536E12C8

View File

@ -37,7 +37,7 @@ public class ConfigMigrator {
* @param settings The target settings instance to migrate.
*/
public void migrate(ConfigHandle settings) {
double versionNumber = settings.get(versionNode);
double versionNumber = settings.getConfig().getDouble(versionNode.getPath());
for (VersionMigrator versionMigrator : versionMigrators) {
if (versionNumber < versionMigrator.getVersion()) {
Logging.info("Migrating config from version %s to %s...", versionNumber, versionMigrator.getVersion());