fix: break out of loop, not switch

This commit is contained in:
Anna
2022-02-07 13:21:45 -05:00
parent 2159f7a36d
commit 4a67e7fdd4
+3 -1
View File
@@ -59,7 +59,8 @@ internal class Configuration : IPluginConfiguration {
} }
public void Migrate() { public void Migrate() {
while (this.Version < LatestVersion) { var loop = true;
while (loop && this.Version < LatestVersion) {
switch (this.Version) { switch (this.Version) {
case 1: { case 1: {
this.Version = 2; this.Version = 2;
@@ -80,6 +81,7 @@ internal class Configuration : IPluginConfiguration {
break; break;
default: default:
PluginLog.Warning($"Couldn't migrate config version {this.Version}"); PluginLog.Warning($"Couldn't migrate config version {this.Version}");
loop = false;
break; break;
} }
} }