fix: load existing projects will crash the playback or have no sound due to missing pitchBend array in the JSON
This commit is contained in:
@@ -6,6 +6,7 @@ import { upgradeToV4 } from './upgradeToV4';
|
||||
import { upgradeToV5 } from './upgradeToV5';
|
||||
import { upgradeToV6 } from './upgradeToV6';
|
||||
import { upgradeToV7 } from './upgradeToV7';
|
||||
import { upgradeToV8 } from './upgradeToV8';
|
||||
|
||||
/**
|
||||
* Upgrade the given project to the latest structure version, one version at a time.
|
||||
@@ -53,6 +54,10 @@ export function upgradeProjectToLatest(project: KGProject): KGProject {
|
||||
workingProject = upgradeToV7(workingProject);
|
||||
break;
|
||||
}
|
||||
case 8: {
|
||||
workingProject = upgradeToV8(workingProject);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
// If an upgrader is missing, throw to prevent loading incompatible structures
|
||||
throw new Error(`No upgrader found for project structure version ${nextVersion}`);
|
||||
|
||||
Reference in New Issue
Block a user