diff --git a/package-lock.json b/package-lock.json index 1123ef94..ed563bfb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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" } diff --git a/package.json b/package.json index 2e8ba692..80ac4927 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/app/components/SourcePanel.tsx b/src/app/components/SourcePanel.tsx index 3a92a104..b1833f9a 100644 --- a/src/app/components/SourcePanel.tsx +++ b/src/app/components/SourcePanel.tsx @@ -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) } } diff --git a/src/app/schema/renderHtml.tsx b/src/app/schema/renderHtml.tsx index e4d263fa..8a891331 100644 --- a/src/app/schema/renderHtml.tsx +++ b/src/app/schema/renderHtml.tsx @@ -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]) => {