auto-git:

[change] src/document/scene-document-validation.ts
This commit is contained in:
2026-04-22 12:28:45 +02:00
parent 0404f7a848
commit 71d8a19f22

View File

@@ -191,7 +191,8 @@ function validateWorldBackgroundSettings(
document: SceneDocument | ProjectDocument,
diagnostics: SceneDiagnostic[],
path: string,
label: string
label: string,
options: { allowEmptyImageAssetId?: boolean } = {}
) {
if (background.mode === "solid") {
if (!isHexColorString(background.colorHex)) {
@@ -238,6 +239,7 @@ function validateWorldBackgroundSettings(
typeof background.assetId !== "string" ||
background.assetId.trim().length === 0
) {
if (!options.allowEmptyImageAssetId) {
diagnostics.push(
createDiagnostic(
"error",
@@ -246,6 +248,7 @@ function validateWorldBackgroundSettings(
`${path}.assetId`
)
);
}
} else {
const backgroundAsset = document.assets[background.assetId];