This commit is contained in:
Misode
2021-09-23 16:44:27 +02:00
parent 0842eb8741
commit f55a911079
4 changed files with 22 additions and 21 deletions

View File

@@ -75,6 +75,7 @@ export function SourcePanel({ lang, name, model, blockStates, doCopy, doDownload
model?.reset(data, false)
} catch (e) {
onError(`Error importing: ${message(e)}`)
console.error(e)
}
}

View File

@@ -186,7 +186,7 @@ export const renderHtml: RenderHook = {
}
}
const body = <>
{(typeof value === 'object' && !(node.optional() && value === undefined)) &&
{(typeof value === 'object' && value !== null && !(node.optional() && value === undefined)) &&
Object.entries(getActiveFields(path))
.filter(([_, child]) => child.enabled(path))
.map(([key, child]) => {