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

38
package-lock.json generated
View File

@@ -9,7 +9,7 @@
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"@mcschema/core": "^0.12.4",
"@mcschema/core": "^0.12.6",
"@mcschema/java-1.15": "^0.2.0",
"@mcschema/java-1.16": "^0.6.3",
"@mcschema/java-1.17": "^0.2.23",
@@ -315,22 +315,22 @@
}
},
"node_modules/@mcschema/core": {
"version": "0.12.4",
"resolved": "https://registry.npmjs.org/@mcschema/core/-/core-0.12.4.tgz",
"integrity": "sha512-EH3by4EIRne3UCeARIrG6DqbY9FXNPiiA1eKtIRy2zfseLNosZgK0xwSC6piaFG96PqBKLFvGvGNlwi8AjF/jQ=="
"version": "0.12.6",
"resolved": "https://registry.npmjs.org/@mcschema/core/-/core-0.12.6.tgz",
"integrity": "sha512-ODSNA7ThHgVlU1FXNAk/zMiNmqEgfgPZJC8G0ZSUiPY/R5iDzaWBgOdVGjIijYhWpNRbQrTww3FWhXueHvs8fg=="
},
"node_modules/@mcschema/java-1.15": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/@mcschema/java-1.15/-/java-1.15-0.2.0.tgz",
"integrity": "sha512-5OInZJrT8A4w3s8zm49R07tFyYK3BDgF2tCJdgvnjikPifBmzZVsmh/xy1JDOD28gpHGl8AB6oPW3SUNK/4HzQ==",
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@mcschema/java-1.15/-/java-1.15-0.2.1.tgz",
"integrity": "sha512-vGOxAc76oukMGfRaktH2KC1CdxTpM5GOGnLfhIfFxw4QSscy6YUkPsr63l+bceeV5e0XHku50w6sH3Yxl103Ng==",
"dependencies": {
"@mcschema/core": "^0.12.0"
}
},
"node_modules/@mcschema/java-1.16": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/@mcschema/java-1.16/-/java-1.16-0.6.3.tgz",
"integrity": "sha512-5vmGZej7Op83hdyU8CGm4o2uhTDJWux+M+rcXUOCcm1qdcXJhTcCQbPFwJIDu3+8zZ7jsvpfnc18VsxwtXNu/w==",
"version": "0.6.4",
"resolved": "https://registry.npmjs.org/@mcschema/java-1.16/-/java-1.16-0.6.4.tgz",
"integrity": "sha512-8s7GfqREHau2JokROYMqR2PrreweWAHNEaK/Wto5P0v7pUHV1KcO48/7TXTogUOqzWYgk9CzjwU1V8/MtN7tnQ==",
"dependencies": {
"@mcschema/core": "^0.12.0"
}
@@ -2790,22 +2790,22 @@
}
},
"@mcschema/core": {
"version": "0.12.4",
"resolved": "https://registry.npmjs.org/@mcschema/core/-/core-0.12.4.tgz",
"integrity": "sha512-EH3by4EIRne3UCeARIrG6DqbY9FXNPiiA1eKtIRy2zfseLNosZgK0xwSC6piaFG96PqBKLFvGvGNlwi8AjF/jQ=="
"version": "0.12.6",
"resolved": "https://registry.npmjs.org/@mcschema/core/-/core-0.12.6.tgz",
"integrity": "sha512-ODSNA7ThHgVlU1FXNAk/zMiNmqEgfgPZJC8G0ZSUiPY/R5iDzaWBgOdVGjIijYhWpNRbQrTww3FWhXueHvs8fg=="
},
"@mcschema/java-1.15": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/@mcschema/java-1.15/-/java-1.15-0.2.0.tgz",
"integrity": "sha512-5OInZJrT8A4w3s8zm49R07tFyYK3BDgF2tCJdgvnjikPifBmzZVsmh/xy1JDOD28gpHGl8AB6oPW3SUNK/4HzQ==",
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@mcschema/java-1.15/-/java-1.15-0.2.1.tgz",
"integrity": "sha512-vGOxAc76oukMGfRaktH2KC1CdxTpM5GOGnLfhIfFxw4QSscy6YUkPsr63l+bceeV5e0XHku50w6sH3Yxl103Ng==",
"requires": {
"@mcschema/core": "^0.12.0"
}
},
"@mcschema/java-1.16": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/@mcschema/java-1.16/-/java-1.16-0.6.3.tgz",
"integrity": "sha512-5vmGZej7Op83hdyU8CGm4o2uhTDJWux+M+rcXUOCcm1qdcXJhTcCQbPFwJIDu3+8zZ7jsvpfnc18VsxwtXNu/w==",
"version": "0.6.4",
"resolved": "https://registry.npmjs.org/@mcschema/java-1.16/-/java-1.16-0.6.4.tgz",
"integrity": "sha512-8s7GfqREHau2JokROYMqR2PrreweWAHNEaK/Wto5P0v7pUHV1KcO48/7TXTogUOqzWYgk9CzjwU1V8/MtN7tnQ==",
"requires": {
"@mcschema/core": "^0.12.0"
}

View File

@@ -14,7 +14,7 @@
"author": "Misode",
"license": "MIT",
"dependencies": {
"@mcschema/core": "^0.12.4",
"@mcschema/core": "^0.12.6",
"@mcschema/java-1.15": "^0.2.0",
"@mcschema/java-1.16": "^0.6.3",
"@mcschema/java-1.17": "^0.2.23",

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]) => {