mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
comments
This commit is contained in:
@@ -117,15 +117,19 @@ function checkProjectVersion({ project }: { project: unknown }): number {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const versionValue = project.version;
|
const versionValue = project.version;
|
||||||
|
|
||||||
|
// v2 and up
|
||||||
if (typeof versionValue === "number") {
|
if (typeof versionValue === "number") {
|
||||||
return versionValue;
|
return versionValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// v1 (got scenes)
|
||||||
const scenesValue = project.scenes;
|
const scenesValue = project.scenes;
|
||||||
if (Array.isArray(scenesValue) && scenesValue.length > 0) {
|
if (Array.isArray(scenesValue) && scenesValue.length > 0) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// v0 (didn't have scenes)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user