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
1 changed files with 3 additions and 1 deletions

View File

@ -59,7 +59,8 @@ internal class Configuration : IPluginConfiguration {
}
public void Migrate() {
while (this.Version < LatestVersion) {
var loop = true;
while (loop && this.Version < LatestVersion) {
switch (this.Version) {
case 1: {
this.Version = 2;
@ -80,6 +81,7 @@ internal class Configuration : IPluginConfiguration {
break;
default:
PluginLog.Warning($"Couldn't migrate config version {this.Version}");
loop = false;
break;
}
}