make reorder more resilient

This commit is contained in:
Ruben Fiszel
2024-01-31 20:52:02 +01:00
parent b528d218ba
commit 0ae668edc6
4 changed files with 9 additions and 4 deletions
@@ -102,7 +102,9 @@
const n = {}
;(schema.order as string[]).forEach((x) => {
n[x] = schema.properties[x]
if (schema.properties && schema.properties[x] != undefined) {
n[x] = schema.properties[x]
}
})
Object.keys(schema.properties ?? {})
@@ -44,7 +44,9 @@
const n = {}
;(schema.order as string[]).forEach((x) => {
n[x] = schema.properties[x]
if (schema.properties && schema.properties[x] != undefined) {
n[x] = schema.properties[x]
}
})
Object.keys(schema.properties ?? {})
@@ -242,7 +242,6 @@
index: index,
propertiesNumber: Object.entries(properties).length
}
console.log(name, property)
if (property?.type === 'object') {
const newPath = [...path, name]
return [
@@ -98,7 +98,9 @@
const n = {}
;(schema.order as string[]).forEach((x) => {
n[x] = schema.properties[x]
if (schema.properties && schema.properties[x] != undefined) {
n[x] = schema.properties[x]
}
})
Object.keys(schema.properties ?? {})