Update background validation for vertical gradient mode

This commit is contained in:
2026-03-31 20:03:10 +02:00
parent 4f2fddfbd5
commit 954cd09086

View File

@@ -93,7 +93,7 @@ function validateWorldSettings(world: WorldSettings, document: SceneDocument, di
)
);
}
} else {
} else if (world.background.mode === "verticalGradient") {
if (!isHexColorString(world.background.topColorHex)) {
diagnostics.push(
createDiagnostic(
@@ -115,7 +115,7 @@ function validateWorldSettings(world: WorldSettings, document: SceneDocument, di
)
);
}
} else if (world.background.mode === "image") {
} else {
if (typeof world.background.assetId !== "string" || world.background.assetId.trim().length === 0) {
diagnostics.push(
createDiagnostic(