Material nodes wip, various refactoring

This commit is contained in:
barsdeveloper
2023-04-25 22:31:21 +02:00
parent dd25a75c02
commit b96746d1d9
36 changed files with 776 additions and 538 deletions

View File

@@ -31,13 +31,13 @@ export default class ObjectReferenceEntity extends IEntity {
sanitize() {
if (this.type && !this.type.startsWith("/")) {
let deprecatedType = this.type + "_Deprecated"
let nodeType = Object.keys(Configuration.nodeType)
let path = Object.keys(Configuration.paths)
.find(type => {
const name = Utility.getNameFromPath(Configuration.nodeType[type])
const name = Utility.getNameFromPath(Configuration.paths[type])
return name === this.type || name === deprecatedType
})
if (nodeType) {
this.type = Configuration.nodeType[nodeType]
if (path) {
this.type = Configuration.paths[path]
}
}
}